An in situ strategy was introduced for synthesizing carbon modified graphitic carbon nitride(g-C3N4) by using urea/4-aminobenzoic acid(PABA) co-crystal(PABA@Urea) as precursor materials. Via co-calcination of the PABA co-former and the urea in PABA@Urea co-crystals, C guest species were generated and compounded into g-C3N4 matrix in situ by replacing the lattice N of the carbon nitride and forming carbon dots onto its layer surface.The carbon modification dramatically enhanced visible-light harvesting and charge carrier separation. Therefore,visible light photo-catalytic oxidation of methylene blue(MB) pollution in water over the carbon modified g-C3N4(C/g-C3N4) was notably improved. Up to 99% of methylene blue(MB) was eliminated within 60 min by the optimalsample prepared from the PABA@Urea co-crystal with a PABA content of 0.1%(mass ratio), faster than the degrada-tion rate over bare g-C3N4. The present study demonstrates a new way to boost up the photocatalysis performance ofg-C3N4, which holds great potential concerning the degradation of organic dyes from water.