Sunlight-induced photocatalytic carbon dioxide (CO2) reduction to energy-rich chemicals by metal-free polymeric carbon nitride (CN) semiconductor is a promising tactic for sustained solar fuel production. However, the reaction efficiency of CO2 photoreduction is restrained seriously by the rapid recombination of photogenerated carriers on CN polymer. Herein, we incorporate the 2-aminopyridine molecule with strong electron-withdrawing group into the skeleton edge of CN layers through a facile one-pot thermal polymerization strategy using urea as the precursor, which renders the modified carbon nitride (ACN) with extended optical harvesting, abundant nitrogen defects and ultrathin nanosheet structure. Consequently, the ACN photocatalyst with desirable structural features attains enhanced separation and migration of photoexcited charge carriers. Under visible light irradiation with Co(bpy)32+ as a cocatalyst, the optimized ACN sample manifests a high CO2 deoxygnative reduction activity and high stability, providing a CO yielding rate of 17 μmol·h-1, which is significantly higher than that of pristine CN. The key intermediates engaged in CO2 photoreduction reaction are determined by the in situ diffuse reflectance infrared Fourier transform spectroscopy, which sponsors the construction of the possible photocatalytic CO2 reduction mechanism on the ACN nanosheets.