We successfully developed the potential parameters for simulation of MgB2. With these potential parameters, we calculate the lattice parameters and volume variations with pressure up to 240GPa. All these results agree well with experimental data under 40GPa and provide reasonable tendencies from 40GPa to 240GPa. By employing the McMillan expression, it is found that the lattice stiffening dominants the behavior of Tc under pressure in the scope of BCS theory. Using our calculated Grüneisen parameter G g , the simulated pressure effect on Tc accords well with experimental results. Our result shows that the Tc of MgB2 can be destroyed by high pressure.