Ab initio calculations of electronic structure of Ni-Mn-Ga Heusler alloys. Calculated X-ray absorption (XAS) and magnetic circular dichroism (XMCD) spectra. The nature of the XMCD properties of Ni-Mn-Ga alloys elucidated. XMCD increases through austenite-martensite phase transition. Discovered a fingerprint of the phase transition for Ni L2,3 XAS spectra.