Molecular dynamics (MD) simulation plays more and more crucial roles in understanding the underlying molecular mechanisms of many biological processes. Unfortunately, due to the large number of degrees of freedom involved and inherently rugged energy surface, the time scale currently reachable by accurate all-atom (AA) simulation is far below typical biologically relevant time scale. Coarse graining the molecular representation can accelerate sampling, but the coarse grained (CG) simulation is unavoidably less accurate in energy estimate. To surmount these problems, a number of strategies have been proposed to integrate the AA and CG simulations, which is often called multiscale simulations. However, traditional multiscale methods heavily rely on the accuracy of the CG model. If the CG potential has its major basins different from those of AA potential, the multiscale simulation is not efficient and sometimes even bias the sampling. Here, we propose a new multiscale simulation method, self-learning multiscale molecular dynamics (SLMS-MD), which can achieve high accuracy and high sampling efficiency simultaneously. Based on the resolution exchange MD between atomistic and CG replicas, a self-learning strategy is introduced to progressively improve the initial CG potential by an iterative way based on the previously sampled CG conformations and their corresponding AA energies. The CG simulation ensures the efficient and broad sampling, and simultaneously the AA energies shape up the accuracy of the CG potential. Testing results show that the SLMS-MD can optimally combine the advantages of the AA and CG simulations, and achieve accurate and efficient multiscale simulations even when the initial CG potential is very poor. The resulting free energy converged to the exact result much faster than that by the replica exchange method. This method is generic and can be applied to many biological as well as non-biological problems.