Strong breakthrough pain is one of the most disabling symptoms of cancer since it affects up to 90% of cancer patients and is often refractory to treatments. Alteration in gene expression is a known mechanism of cancer pain in which microRNAs (miRNAs), a class of non-coding regulatory RNAs, play a crucial role. Here, in a mouse model of cancer pain, we show that miR-124 is down-regulated in the spinal cord, the first relay of the pain signal to the brain. Using in vitro and in vivo approaches, we demonstrate that miR-124 is an endogenous and specific inhibitor of synaptopodin (Synpo), a key protein for synaptic transmission. In addition, we demonstrate that Synpo is a key component of the nociceptive pathways. Interestingly, miR-124 was down-regulated in the spinal cord in cancer pain conditions, leading to an up-regulation of Synpo. Furthermore, intrathecal injections of miR-124 mimics in cancerous mice normalized Synpo expression and completely alleviated cancer pain in the early phase of the cancer. Finally, miR-124 was also down-regulated in the cerebrospinal fluid of cancer patients who developed pain, suggesting that miR-124 could be an efficient analgesic drug to treat cancer pain patients.