Given the initial conditions of spatial density distribution, velocity distribution and mass function, the dynamical evolution of globular clusters in the Milky Way is investigated in details by means of Monte Carlo simulations. Four dynamic mechanisms are considered: stellar evaporation, stellar evolution, tidal shocks due to both the disc and bulge, and dynamical friction. It is found that stellar evaporation dominates the evolution of low-mass clusters and all four are important for massive ones. For both the power-law and lognormal initial clusters mass functions, we can find the best-fitting models which can match the present-day observations with their main features of the mass function almost unchanged after evolution of several Gyr. This implies that it is not possible to determine the initial mass function only based on the observed mass function today. The dispersion of the modelled mass functions mainly depends on the potential wells of host galaxies with the almost constant peaks, which is consistent with current observations.