At present, the development of eco-friendly corrosion inhibitors (CIs) is considered an important and attractive method for controlling the corrosion of metals in acidic media. In this study, protein-derived carbon dots (P-CDs) were prepared via hydrothermal reaction using protein as the raw material, and the corrosion inhibition performances of P-CDs for carbon steel (CS) were investigated systematically. The electrochemical test results showed that the corrosion inhibition efficiency of 500 mg/L P-CDs on CS reached 95.1 % in 0.5 M H2SO4, and the corrosion inhibition efficiency was enhanced to 98.1 % after 8 h of immersion time. The composition and characterization of P-CDs was analysed using Fourier Transform Infrared Spectroscopy (FTIR), Ultraviolet Spectroscopy (UV), X-ray Diffraction (XRD) and Transmission Electron Microscopy (TEM). Atomic force microscopy (AFM) and scanning electron microscopy (SEM) characterization showed that the surface of CS with P-CDs was smoother than that without P-CDs, and that P-CDs was able to adsorb on the surface of CS to form a protective layer, thereby inhibiting corrosion. Adsorption studies indicate that P-CDs form a protective layer on the surface of CS through both physisorption and chemisorption. Overall, these findings demonstrate that P-CDs exhibit superior protective effects against the corrosion of CS in 0.5 M H2SO4.