The ferromagnetic shape memory alloy Mn2NiGa was developed recently. In order to improve the properties of this material and develop new ferromagnetic shape memory alloys, in this work an experiment of partially substituting Fe or Co for Ni in Mn2NiGa alloys was carried out to examine the effect of Fe or Co in quaternary Mn50Ni25-xFe(Co)xGa25 alloys on their structure, magnetic properties, martensitic transformation, and mechanical properties. Some interesting results were presented in this paper.