Transcranial direct current stimulation (tDCS) can modulate mind wandering, which is a shift in the contents of thought away from an ongoing task and/or from events in the external environment to self-generated thoughts and feelings. Although modulation of the mind-wandering propensity is thought to be associated with neural alterations of the lateral prefrontal cortex (LPFC) and regions in the default mode network (DMN), the precise neural mechanisms remain unknown. Using functional magnetic resonance imaging (fMRI), we investigated the causal relationships among tDCS (one electrode placed over the right IPL, which is a core region of the DMN, and another placed over the left LPFC), stimulation-induced directed connection alterations within the DMN, and modulation of the mind-wandering propensity. At the behavioral level, anodal tDCS on the right IPL (with cathodal tDCS on the left LPFC) reduced mind wandering compared to the reversed stimulation. At the neural level, the anodal tDCS on the right IPL decreased the afferent connections of the posterior cingulate cortex (PCC) from the right IPL and the medial prefrontal cortex (mPFC). Furthermore, mediation analysis revealed that the changes in the connections from the right IPL and mPFC correlated with the facilitation and inhibition of mind wandering, respectively. These effects are the result of the heterogeneous function of effective connectivity: the connection from the right IPL to the PCC inhibits mind wandering, whereas the connection from the mPFC to the PCC facilitates mind wandering. The present study is the first to demonstrate the neural mechanisms underlying tDCS modulation of mind-wandering propensity.