Painful diabetic neuropathy (PDN) is a common complication in patients with diabetes, and its underlying mechanism remains unclear. Aquaporin-4 (AQP4) plays a crucial role in removing metabolic waste in the glymphatic system. In this study, we aimed to explore the relationship between the spinal glymphatic system and the effect of metformin on PDN. Male Sprague-Dawley rats were randomly allocated into the control group (n = 10), the PDN group (n = 10), and the metformin group (n = 10). A high-fat and high-glucose diet combined with low-dose streptozotocin was used to induce PDN rats. We detected the clearance rate of the contrast agent in the spinal cord of each rat by MRI to reflect the function of the glymphatic system. Immunofluorescence was used to detect the localization of perivascular AQP4 in astrocyte endfeet. Furthermore, we measured the expression of AQP4 in the spinal cord by Western blot. Compared with the rats in the control group, PDN rats exhibited enhanced mechanical allodynia, decreased clearance rate of the contrast agent in the spinal glymphatic system, reversed AQP4 polarization, and increased expression of AQP4. After being treated with metformin, the rats showed opposite changes in the above characteristics. The analgesic effect of metformin on PDN may be related to its ability to restore spinal AQP4 polarization, thus promoting the function of the spinal glymphatic system.