Large magnetic-field-induced strains have been observed in Heusler alloys with a body-centred cubic ordered structure and have been explained by the rearrangement of martensite structural variants due to an external magnetic field. These materials have attracted considerable attention as potential magnetic actuator materials. Here we report the magnetic-field-induced shape recovery of a compressively deformed NiCoMnIn alloy. Stresses of over 100 MPa are generated in the material on the application of a magnetic field of 70 kOe; such stress levels are approximately 50 times larger than that generated in a previous ferromagnetic shape-memory alloy. We observed 3 per cent deformation and almost full recovery of the original shape of the alloy. We attribute this deformation behaviour to a reverse transformation from the antiferromagnetic (or paramagnetic) martensitic to the ferromagnetic parent phase at 298 K in the Ni45Co5Mn36.7In13.3 single crystal.