Intervertebral disc (IVD) degeneration and its inflammatory microenvironment can result in discogenic pain, which has been shown to stem from the nucleus pulposus (NP). Increasing evidence suggests that mitochondrial related genes are strictly connected to cell functionality and, importantly, it can regulate cell immune activity in response to damaged associated signals. Therefore, identification of mitochondria related genes might offer new diagnostic markers and therapeutic targets for IVD degeneration. In this study, we identified key genes involved in NP tissue immune cell infiltration during IVD degeneration by bioinformatic analysis. The key modules were screened by weighted gene co-expression network analysis (WCGNA). Characteristic genes were identified by random forest analysis. Then gene set enrichment analysis (GSEA) was used to explore the signaling pathways associated with the signature genes. Subsequently, CIBERSORT was used to classify the infiltration of immune cells. Function of the hub gene was confirmed by PCR, Western blotting and ELISA. Finally, we identified MFN2 as a crucial molecule in the process of NP cell pyroptosis and NLRP3 inflammasome activation. We speculate that the increased MFN2 expression in NP tissue along with the infiltration of CD8 T cells, NK cell and neutrophils play important roles in the pathogenesis of IVD degeneration.