Abstract Irreversibility lines and magnetic relaxation of MgB2 are studied. The large separation between irreversibility line and upper critical magnetic field for T→0 is explained by quantum fluctuations of vortices. Theoretical fits are in good agreement with experimental data. Magnetic relaxation rates of MgB2 are studied. A quantum correction of the relaxation rate is proposed, leading to a simple evaluation of the energy barrier: U0(T,H)∼Uth(T)UH(H)∝(1−T/Tc)α(μ0H)β with α∼1.5 and β∼−2.0.