We investigated the effect of doping of burned rice husk which contains ultrafine SiO2 and highly reactive carbon, on the crystal lattice and superconducting properties of MgB2 superconductor prepared by an in situ powder in sealed tube method. XRD, TEM, and magnetic measurements confirm the substitution of carbon atoms at boron sites in the MgB2 lattice and the formation of intragrain nanoinclusions in MgB2. From JC (H) characteristics, doped samples show a drastic enhancement of JC compared with pure MgB2. The enhancement of in-field JC values is due to the flux pinning on lattice defects produced by C substitution and nanoscale inclusions of impurity phases.