Transitions of the FeH molecule are dominating features in the near-infrared spectra of sunspots, starspots and red and brown dwarfs. Their remarkable magnetic sensitivity provides an excellent opportunity to study magnetic fields in these cool objects. However, the absence of an adequate theoretical model of the molecule capable to reproduce its observed magnetic properties limits the usage of these transitions in solar and stellar magnetic studies. Here we present the first successful semi-empirical model of the FeH F-4 Delta - X-4 Delta system based on the Hamiltonian for the intermediate Hund's case (a-b) and a perturbation from a nearby electronic state, resulting in modification of the spin-orbit and spin-spin coupling. Our model is able to reproduce the broadening of FeH lines due to the Zeeman effect and their polarization signatures detected in sunspots and starspots and, for the first time, provides reliable Lande factors. This opens a, door for developing further applications for red and brown dwarfs.