Quinazolin-4(3H)-one derivatives containing long-chain pyridinium salts were synthesized by a quaternization reaction of pyridine. The confirmation of the synthesized compounds structure was performed by FT-IR, H-1 NMR and C-13 NMR spectroscopy. Corrosion inhibition tests were performed at room temperature for 24 h on carbon steel coupons in 1.5 M HCl using the weight loss measurements. After the corrosion tests of the compounds it has shown that almost all of the prepared pyridinium salts showed efficient corrosion inhibition at higher inhibitor concentrations (100-250 ppm). Nevertheless, the quinazolin-(3H)-4-one derivative with the longest alkyl chain showed fairly good inhibition in acidic media. To support and establish the corrosion inhibition test results several surface imaging and characterization studies (contact angle, optical profilometer and SEM) were also performed.