Counterions play an important role in biomolecular functions. Although molecular dynamics simulations have been applied on various nucleic acids, accurate and efficient descriptions of ion motions around DNA or RNA are still challenging, largely due to ions’ slow mobility. Here, a variant Hamiltonian replica exchange method was developed to achieve efficient sampling of ion motions. Based on the present approach, the results from our model study on classical Drew–Dickerson B-DNA dodecamer show remarkable agreements with experimental measurements and nonlinear Poisson–Boltzmann predictions. Due to the employment of this variant Hamiltonian replica exchange method, these amazing agreements can be achieved within a short simulation time (900ps).