Metal corrosion results in significant economic losses and poses potential safety problems. Graphene oxide (GO) is an innovative and effective corrosion inhibitor but suffers from a laborious and financially burdensome post-modification. Herein, zero-dimensional carbon-based graphene quantum dots without and with N doping (namely, GQDs and NGQDs) were synthesized without any post-modification, and innovatively served as a novel green, efficient corrosion inhibitor for carbon steel. Crucially, their inhibition mechanism and the inhibiting enhancement mechanism induced by N incorporation was comprehensively revealed. The results showed that in stark contrast to GO, GQDs and NGQDs without post-treatment possessed smaller sizes, much better monodispersity, and higher water solubility. And they displayed a remarkable inhibition efficiency (η) for carbon steel, which was comparable to the modified GO. Specifically, GQDs exhibited an η of 83.32% at a concentration of 200 mg/L, while NGQDs achieved an even higher η of 89.25%. As evidenced by the corrosion morphology investigation, adsorption isotherm analysis, and theoretical calculation, the inhibition mechanism of GQDs and NGQDs was attributed to their physical and chemical adsorption on the steel surface, hindering metal dissolution of the anode and hydrogen evolution of the cathode. Innovatively, density functional theory and molecular dynamics simulation elucidated the positive impact of N doping on the inhibition performance of NGQDs. That was N doping endowed NGQDs with better charge-donating ability, leading to stronger adsorption on the steel substrate than GQDs. This study not only contributed to addressing a critical need in the industry by presenting a viable environmentally friendly, low-cost, and efficient corrosion inhibitor, but also provided new insights for the development of corrosion inhibition theory.