We have studied the effect of Fe addition on the structural and magnetic transitions in the magnetic shape memory alloy Ni-Mn-Ga by substituting systematically each atomic species by Fe. Calorimetric and ac susceptibility measurements have been carried out in order to study the magnetic and structural transformation properties. We find that the addition of Fe modifies the structural and magnetic transformation temperatures. Magnetic transition temperatures are displaced to higher values when Fe is substituted into Ni-Mn-Ga, while martensitic and premartensitic transformation temperatures shift to lower values. Moreover, it has been found that the electron per atom concentration essentially governs the phase stability in the quaternary system. However, the observed scaling of transition temperatures with e/a differs from that reported in the related ternary system Ni-Mn-Ga.