Cocaine use disorder (CUD) is a worldwide problem with severe health and socio-economic consequences, which results in behavioral, cognitive, and neurobiological disturbances. Consensus on treatments are still under discussion, however, repetitive transcranial magnetic stimulation (rTMS) has been proposed as a promising treatment for medication-resistant disorders, including substance use disorders. Here, we describe the Mexican dataset of an rTMS clinical trial in patients with CUD (SUDMEX-TMS), a longitudinal dataset of 54 CUD participants (8 female) with five timepoints: baseline (T0), two weeks (T1), three months (T2), six months (T3) follow-up, and twelve months (T4) follow-up. Clinical rTMS treatment consisted of a double-blinded randomized clinical trial (n = 20 sham/24 active) for 2 weeks and open label afterwards, and includes demographic, clinical, and cognitive measures, as well as magnetic resonance imaging (MRI) acquisition in all timepoints: 1) structural (T1-weighted), 2) functional (resting state fMRI), and 3) multishell high-angular resolution diffusion-weighted (DWI-HARDI) sequences. The present dataset could be used to examine the impact of rTMS on CUD participants in clinical, cognitive, and multimodal MRI metrics in a longitudinal design.