Abstract A module with self-consistent evolution of driven current is developed and coupled with the resistive-MHD equations in the three-dimensional, toroidal, and nonlinear simulation code (CLT). The driven current equation is solved with a second-order accuracy symmetric scheme, which exhibits good conservation properties. With the new module, we find that the driven current can self-consistently concentrate inside the magnetic island when the parallel diffusion of the driven current is sufficiently large. The efficiency of the driven current on tearing mode suppression will then be much higher than those with stationary distributions. With the new module, the influence of electron cyclotron current drive (ECCD) on the nonlinear evolution of the 2/1 double tearing modes (DTMs) is investigated. When co-ECCD deposits on the outer resonant surface, the local magnetic shear is reduced, and the growth rates of the DTMs decrease; if ctr-ECCD deposits on the outer resonant surface, the local magnetic shear increases, and the DTMs become more unstable. However, things will be different if ECCD deposits on the inner resonant surface since the local magnetic shear is negative. The co-ECCD deposited on the inner resonant surface increases the negative shear and then promotes the growth of the DTMs; while the ctr-ECCD suppresses the DTMs. It is also found that the off-axis and central pressure crashes associated with the 2/1 DTMs can be converted to each other by properly depositing the driven current. To convert a central crash to an off-axis crash, the co-ECCD should be deposited on the outer resonant surface, or the ctr-ECCD deposited on the inner resonant surface. While, the co-ECCD should be deposited on the inner rational surface, or the ctr-ECCD deposited on the outer rational surface to convert an off-axis crash to a central crash. The co- or ctr-ECCD should be larger than a threshold for such transitions, and the threshold value is mainly determined by the location of the inner resonant surface.