Hybrid coatings were prepared, via a sol-gel route from 3-(trimethoxysilyl)propyl methacrylate) (MAPTMS), tetraethyl orthosilicate (TEOS), and derivatives of methacrylate (methyl-, ethyl-, butyl-, hexyl-, octyl- and dodecyl methacrylate). The main goal of this study was to evaluate how the length of the alkyl chain of the ester part of a methacrylate influences the anti-corrosion property of the coatings. Fourier transform infrared spectroscopy, nuclear magnetic resonance spectroscopy, contact angle measurements, and scanning electron microscopy with chemical analysis were used to determine the chemical composition, structure, wettability and morphology of the coatings. The contact angle of the coatings increased from methyl- to butyl-containing coating (from 60° up to 80°); at the same time the surface free energy decreased. For longer chains, a plateau was reached (≈75°), which was in contrast to the prediction that a longer chain would result in reduced wettability due to its nonpolar alkyl part. The anti-corrosion behavior in 3.5 wt. % NaCl of the coatings deposited on structural steel was studied by electrochemical impedance spectroscopy. The coatings with ethyl and butyl groups exhibited the best anti-corrosion performance and remained intact over six months of immersion. The related values of impedance magnitude at low frequency was 1010 Ω cm2 after six months. This high corrosion resistance was due to the appropriate combination of condensation degree and wettability. Coatings with longer alkyl chains (hexyl, octyl, and dodecyl) showed poor corrosion resistance due to lower heterocondensation and a larger nonpolar effect that resulted in non-homogenous mixing, which could not produce dense and protective coatings.