We investigated the effect of SiC nanoparticle doping on the crystal lattice structure, critical temperature Tc, critical current density Jc, and flux pinning in MgB2 superconductor. A series of MgB2–x(SiC)x/2 samples with x = 0–1.0 were fabricated using an in situ reaction process. The contraction of the lattice and depression of Tc with increasing SiC doping level remained rather small most likely due to the counterbalancing effect of Si and C co-doping. The high level Si and C co-doping allowed the creation of intragrain defects and highly dispersed nanoinclusions within the grains which can act as effective pinning centers for vortices, improving Jc behavior as a function of the applied magnetic field. The enhanced pinning is mainly attributable to the substitution-induced defects and local structure fluctuations within grains. A pinning mechanism is proposed to account for different contributions of different defects in MgB2–x(SiC)x/2 superconductors.