The mechanism for the effects of pressure on the magnetic properties and the martensitic transformation of Ni-Mn- Sn shape memory alloys is revealed by first-principles calculations. It is found that the total energy difference between paramagnetic and ferromagnetic austenite states plays an important role in the magnetic transition of Ni-Mn-Sn under pressure. The pressure increases the relative stability of the martensite with respect to the anstenite, leading to an increase of the martensitic transformation temperature. Moreover, the effects of pressure on the magnetic properties and the martensitic transformation are discussed based on the electronic structure.