The strong coupling between the crystal structure and magnetic state (ferromagnetic or helical antiferromagnetic) of FeMnP 0.75 Si 0.25 is investigated using density functional theory in combination with atomistic spin dynamics. We find many competing energy minima for drastically different ferromagnetic and noncollinear magnetic configurations. We also find that the appearance of a helical spin-spiral magnetic structure at finite temperature is strongly related to one of the crystal structures reported for this material. Shorter Fe-Fe distances are found to lead to a destabilized ferromagnetic coupling, while out-of-plane Mn-Mn exchange interactions become negative with the shortening of the interatomic distances along the c axis, implying an antiferromagnetic coupling for the nearest-neighbor Mn-Mn interactions. The impact of the local dynamical correlations is also discussed.