We report on the preparation and investigation of epitaxial thin films of the magnetic shape memory alloy Ni2MnGa. For samples close to the stoichiometric composition we find that the phase transformation temperature is affected by the crystallographic orientation. Changes in the crystal structure due to the transformation are observed using temperature-dependent X-ray diffraction. Films with higher manganese content are in the martensitic state at room temperature. Those samples on Al2O3(11-20) reveal the 7-layered orthorhombic structure that allows strains up to 10 %. To avoid blocking of magnetostrictive effects by the substrate, free-standing films are prepared using water-soluble NaCl(100) single crystals as substrate.