Transcranial direct current stimulation (tDCS) is used for modulating brain functions, but the optimal protocol remains unclear. We found that mouse learning to run on a rotarod was enhanced by anodal tDCS during (“online”) but not before or after (“offline”) the task performance. The enhancement was task-specific, since online tDCS during rotarod learning did not affect learning of beam walking, and vice versa. For mice underwent middle cerebral artery occlusion (MCAO), online anodal tDCS restored motor learning capability in a task-specific manner. Transcranial calcium imaging showed that anodal and cathodal tDCS elevated and suppressed cortical neuronal activity, respectively, suggesting that elevated spiking in task-activated neural circuits underlie the learning enhancement. Thus, the efficacy of tDCS could be elevated by conjunctive activation of targeted neural circuits.One sentence summaryTranscranial direct current stimulation applied in temporal conjunction with the motor task enhances motor learning in a task-specific manner.