Protein derived carbon quantum dots (PCQDs) were successfully fabricated via a hydrothermal method with shrimp meat as the precursor. Subsequently, their corrosion-inhibiting performance on mild steel (L-steel) in a 0.5 mol/L H2SO4 solution was evaluated. Electrochemical impedance spectroscopy (EIS) tests demonstrated that at a concentration of 250 mg/L, the corrosion inhibition efficiency of PCQDs exceeded 90 %. Potentiodynamic polarization (PDP) tests indicated that when the concentration of PCQDs reached 500 mg/L, the corrosion inhibition efficiency was as high as 97.45 %. Comprehensive characterizations of the PCQDs, including X-ray diffraction (XRD), transmission electron microscopy (TEM), Fourier transform infrared spectroscopy (FTIR), and ultraviolet–visible spectroscopy (UV–Vis), verified the existence of functional groups such as carboxyl, hydroxyl, and aromatic rings within the PCQDs. These groups are conducive to forming a strong adsorption force on the surface of L-steel and creating a protective layer. Surface morphology analyses carried out by scanning electron microscopy (SEM) and atomic force microscopy (AFM) revealed that the surface of L-steel treated with PCQDs was significantly smoother in comparison to untreated samples exposed to acidic conditions. Adsorption studies disclosed a mixed physical and chemical adsorption behavior, and theoretical calculations showed that the N and S atoms in PCQDs preferentially adsorb in a parallel direction. The addition of PCQDs led to a reduction in the diffusion coefficient, indicating that the diffusion of corrosive ions was effectively hindered. The distribution function of PCQDs was 3.48 Å, which suggested that the chemisorption mechanism played a dominant role in the inhibition process.