The structure and nanoscale mechanical properties of Ni48.8Mn27.2Ga24 thin film fabricated by DC magnetron sputtering are investigated systematically. The thin film has the austenite state at room temperature with the L21 Hesuler structure. During nanoindentation, stress-induced martensitic transformation occurs on the nanoscale for the film annealed at 823 K for 1 hour and the shape recovery ratio is up to 85.3%. The associated mechanism is discussed.