This study used DC magnetron sputtering technology to fabricate Sm-Fe films and systematically investigated the phase transition behavior of Sm-Fe films with different Fe ratios. It was found that at higher Fe content, the films consisted of Sm2Fe17 or SmFe7 phases; as Fe content decreased, the films were mainly composed of SmFe3 or SmFe2 phases; at higher Sm content, the films primarily consisted of Sm phase. Sm is prone to volatilization at high temperatures, so Ta was used as a capping layer to effectively suppress Sm volatilization, successfully synthesizing pure SmFe2 phase films at a nearly 1:2 ratio. The magnetic properties and magnetostrictive behavior of the SmFe2 films were investigated, revealing that pure-phase SmFe2 films exhibit good perpendicular magnetic anisotropy and magnetostriction properties. The larger stress along the perpendicular-to-film direction, resulting from the absence of substrate-induced constraints, contributes to the excellent perpendicular magnetic anisotropy of the films. This study successfully synthesized pure-phase SmFe2 films and discovered a new method for fabricating perpendicularly anisotropic films. The research findings are of great significance for the efficient synthesis of desired films with high phase formation temperatures containing volatile elements.