Mind-wandering, the mind's capacity to stray from external events and generate task-unrelated thought, has been associated with activity in the brain default network. To date, little is understood about the contribution of individual nodes of this network to mind-wandering. Here, we investigated the role of medial prefrontal cortex (mPFC) in mind-wandering, by perturbing this region with transcranial direct current stimulation (tDCS). Young healthy participants performed a choice reaction time task both before and after receiving cathodal tDCS over mPFC, and had their thoughts periodically sampled. We found that tDCS over mPFC - but not occipital or sham tDCS - decreased the propensity to mind-wander. The tDCS-induced reduction in mind-wandering occurred in men, but not in women, and was accompanied by a change in the content of task-unrelated though, which became more related to other people (as opposed to the self) following tDCS. These findings indicate that mPFC is crucial for mind-wandering, possibly by helping construction of self-relevant scenarios capable to divert attention inward, away from perceptual reality. Gender-related differences in tDCS-induced changes suggest that mPFC controls mind-wandering differently in men and women, which may depend on differences in the structural and functional organization of distributed brain networks governing mind-wandering, including mPFC.