Background. With the extensive development of intervertebral disc degeneration (IDD) research, IDD has been found to be a complex disease associated with immune-related gene (IRGs) changes. Nonetheless, the roles of IRGs in IDD are unclear. Methods. In our study, 11 IRGs were chosen using differential analysis between nondisc degeneration and degenerative patients from the GEO database. Then, we utilized a random forest (RF) model to screen six candidate IRGs to predict the risk of IDD. A nomogram was developed on the basis of six candidate IRGs, and DCA showed that patients could benefit from the nomogram. Based on the selected significant IRGs, a consensus clustering approach was used to differentiate disc degeneration patients into two immune patterns (immune cluster A and B). The PCA algorithm was constructed to compute immune scores for every sample, to quantify immune patterns. The immune scores of immune cluster B patients were higher than those of immune cluster A. Results. Through differential expression analysis between healthy and IDD samples, 11 significant IRGs (CTSS, S100Z, STAT3, KLRK1, FPR1, C5AR2, RLN1, IFGR2, IL2RB, IL17RA, and IL6R) were recognized through significant IRGs. The “Reverse Cumulative Distribution of Residual” and “Boxplots of Residual” indicate that the RF model has minimal residuals. The majority of samples in the model have relatively small residuals, demonstrating that the model is better. Besides, the nomogram model was constructed based on importance and the IRGs with importance scores greater than 2 (FPR1, RLN1, S100Z, IFNGR2, KLRK1, and CTSS). The nomogram model revealed that decision-making based on an established model might be beneficial for IDD patients, and the predictive power of the nomogram model was significant. In addition, we identified two different immune cluster patterns (immune cluster A and immune cluster B) based on the 11 IRGs. We found that immune cluster A had significantly higher levels of MDSC, neutrophil, plasmacytoid dendritic cell, and type 17 T helper cell expression than immune cluster B. And we calculated the score for each sample to quantify the gene patterns. The patients in immune cluster B or gene cluster B had higher immune scores than those in immune cluster A or gene cluster A. Conclusion. In conclusion, IRGs play an extremely significant role in the occurrence of IDD. Our study of immune patterns may guide the strategies of prevention and treatment for IDD in the future.