Mild steel is primarily used in reinforced concrete structures, because it has a low corrosion rate due to the formation of a passive oxide film in the alkaline environment. However, when exposed to acidic and atmospheric environments or aqueous environments containing dissolved salts such as sea water, the protective film deteriorates and corrosion occurs due to contamination caused by chloride and carbonation. It is possible to obtain corrosion inhibitors by extraction of bioactive compounds from plants. Thus, inexpensive and environmentally friendly new effective inhibitors are obtained as an alternative to environmentally harmful inhibitors. In this context, the subject of the study was determined as the investigation of the inhibition efficiency of the vanillin phenolic compound in the Çorum Oğuzlar walnut shell extract, which is a local product, on the corrosion of AISI 1010 mild steel in acidic, alkaline and salty environments. The walnut shells, which were cleaned, ground and pre-sieved with a certain grain size, were extracted in seven different solvents. In order to find the appropriate solvent, the total phenolic content (TPC) in the extracts was determined by both the Folin Ciocalteu method and the liquid chromatography-mass spectrometry/mass spectrometry (LC-MS/MS) system. Cyclic voltammetry (CV) and Tafel polarization methods were applied to determine the effect of the extract on the electrochemical behavior of AISI 1010 and its corrosion rate. LC-MS/MS analysis showed the presence of compounds containing p electrons, N and O heteroatoms responsible for the corrosion inhibition. The best inhibition effectiveness was obtained with 86.1% acetone-water mixture in acidic environment (0.2 M HCl).