Extended X‐ray absorption fine structure (EXAFS) and X‐ray magnetic circular dichroism (XMCD) spectroscopy have been employed to understand the factors responsible for martensitic transformation in Ni–Mn based ferromagnetic shape memory alloys. Local structural distortions have been found even in the austenitic phase in Ni2Mn1.4Z0.6 (Z = Sn and In) alloys. Systematic investigations on Ni2Mn1+xIn1−x (x = 0, 0.3, 0.4, 0.5, and 0.6) reveal a progressive difference between Ni–In and Ni–Mn nearest neighbor bond distances that drive these alloys to martensitic transformation. Thermal evolution of Ni–Mn and Mn–Mn bond distances in the martensitic phase gives a clear evidence of a close relation between structural and magnetic degrees of freedom in these alloys. X‐ray absorption spectroscopy along with XMCD studies highlight the role of Ni 3d–Mn 3d hybridization in the magnetism of the martensitic phase of these alloys.