The shape memory effect (SME) induced by the magnetic field is interesting and important for physics and application. The ferromagnetic Ni 2 MnGa films with various compositions were deposited on a poly-vinyl alcohol (PVA) substrate with a radio-frequency (RF) magnetron sputtering apparatus using four kinds of Ni-Mn-Ga targets. After separating from the substrate, the films were heat-treated at 1073 K for 3.6 ks for homogenization and aged at 673 K for 3.6 ks in a constraint condition. The reversible two-way SME by the thermal change was confirmed for the constraint-aged films with various compositions. The gradient of the strain-temperature curve, the amount of strain accompanied by the twoway SME and the width of thermal hysteresis were dependent on the composition of the films. The strain-temperature curve shifted to a high temperature region and the martensitic phase was stabilized by the applied magnetic field. Furthermore, the two-way SME by the magnetic field was observed around the martensitic transformation temperature on cooling for the constraint-aged film, which showed the large gradient and small thermal hysteresis in the strain-temperature curve.