Major depressive disorder (MDD) is a common complication of diabetes and is often observed alongside diabetic neuropathic pain (DNP) as a comorbidity in diabetic patients. Long non-coding RNA (lncRNA) plays an important role in various pathophysiological processes. The P2X7 receptor is responsible for triggering inflammatory responses, such as pyroptosis, linked to pain and depression. The aim of this study was to investigate the effect of lncRNA MSTRG.81401 on hippocampal pyroptosis induced by the P2X7 receptor in diabetic rats with DNP combined with MDD (DNP + MDD). Our results showed that the expression of lncRNA MSTRG.81401 was significantly elevated in the hippocampus of DNP + MDD rats compared with the control group. Following the administration of shRNA targeting lncRNA MSTRG.81401, a notable elevation in mechanical and thermal pain thresholds was observed in rats with comorbid DNP and MDD. Additionally, significant improvements in depression-like behaviors were evident in the open-field test (OFT), sucrose preference test (SPT), and forced swim test (FST). In the DNP + MDD rats, elevated levels in hippocampal P2X7 receptor mRNA and protein were observed, along with increased co-expression of P2X7 and the astrocytic marker glial fibrillary acidic protein (GFAP). Meanwhile, in DNP + MDD rats, the heightened mRNA expression of NOD-like receptor protein 3 (NLRP3), apoptosis-associated speck-like protein (ASC), pyroptosis-related protein Gasdermin D (GSDMD), caspase-1, IL-1β, IL-18, and TNF-α was detected, in addition to increased serum levels of IL-1β, IL-18 and TNF-α. After shRNA treatment with lncRNA MSTRG.81401, the above abnormal changes in indicators for pyroptosis and inflammation were improved. Therefore, our study demonstrates that shRNA of lncRNA MSTRG.81401 can alleviate the pain and depression-like behaviors in diabetic rats associated with the comorbidity of DNP and MDD by inhibiting the hippocampal P2X7 receptor-mediated pyroptosis pathway and pro-inflammatory responses. This suggests that the P2X7R/NLRP3/caspase-1 implicated pyroptosis and inflammatory scenario may serve as a potential target for the management of comorbid DNP and MDD in diabetes.