Repetitive transcranial magnetic stimulation (rTMS) is commonly used to study the brain or as a treatment for neurological disorders, but the neural circuits and molecular mechanisms it affects remain unclear. To determine the molecular mechanisms of rTMS and the brain regions they occur in, we used spatial transcriptomics to map changes to gene expression across the mouse brain in response to two commonly used rTMS protocols. Our results revealed that rTMS alters the expression of genes related to several cellular processes and neural plasticity mechanisms across the brain, which was both brain region- and rTMS protocol-dependent. In the cortex, the effect of rTMS was dependent not only on the cortical region but also on each cortical layer. These findings uncover the diverse molecular mechanisms induced by rTMS, which will be useful in interpreting its effects on cortical and subcortical circuits.