Cocaine is known to activate microglia both in vitro and in vivo. High expression of microglial Toll-like receptors (TLRs) and their downstream signal transducers play critical roles in determining microglial activation status. Emerging reports have also demonstrated that cocaine can enhance the strength of TLR signaling. Detailed molecular mechanisms underlying this phenomenon, however, remain elusive. In this study, we investigated the role(s) of miR-124 in regulating microglial TLR4 signaling in the context of cocaine. Herein, we found a dose- and time-dependent upregulation of KLF4 in cocaine-exposed BV-2 cells and rat primary microglial cells (rPMs). KLF4 also identified as a novel 3'-UTR target directly regulated by miR-124. In parallel, miR-124 regulated multiple TLR4 signaling molecules including TLR4, MyD88, TRAF6, and IRAK1. Repeated doses of cocaine (20 mg/kg; i.p.) administration in mice for 7 days further validated the in vitro key findings. Also, miR-124 overexpression significantly blocked the cocaine-mediated upregulation of pro-inflammatory cytokines. In contrast, miR-124 overexpression notably increased the expression of anti-inflammatory mediators in cocaine-exposed microglial cells. Intriguingly, stereotactic administration of lentivirus-miR-124 in the striatum significantly inhibited cocaine-mediated microglial activation and locomotor hyperactivity in vivo. In summary, these findings implicate the role of miR-124 in regulating TLR4 signaling, thereby indicating a new pathway responsible for cocaine-mediated microglial activation.