We demonstrate a molecular approach of tuning the magnetic properties of ferromagnetic (FM) thin films by reversing the functional groups of the organic underlayer. For the CoFe/Langmuir-Blodgett (LB) film system, we find that the coercivity of CoFe thin films (from 4 to 10 nm) made on hydrophobic surfaces is significantly enhanced whereas that on hydrophilic surfaces remains unchanged, as compared with the films directly on glass substrates. These findings suggest an alternative way for tuning the magnetic properties of the FM layer by LB film in which the functional groups play an important role. (C) 2010 American Institute of Physics. [doi:10.1063/1.3457907]