Extranodal diffuse large B cell lymphoma (EN DLBCL) often leads to poor outcomes, while the underlying mechanism remains unclear. As immune imbalance plays an important role in lymphoma pathogenesis, we hypothesized that immune genes might be involved in the development of EN DLBCL. Ninety-three differentially expressed immune genes (DEIGs) were identified from 1168 differentially expressed genes (DEGs) between tumor tissues of lymph node DLBCL (LN DLBCL) and EN DLBCL patients in TCGA database. Nine prognostic immune genes were further identified from DEIGs by univariate Cox regression analysis. A multivariate predictive model was established based on these prognostic immune genes. Patients were divided into high- and low-risk groups according to the median model-based risk score. Kaplan-Meier survival curves showed that patients in the high-risk group had a shorter survival time than those in the low-risk group (P < 0.001). Ubiquitin-specific peptidase 18 (USP18) was further recognized as the key immune gene in EN DLBCL on the basis of coexpression of differentially expressed transcription factors (DETFs) and prognostic immune genes. USP18 exhibited low expression in EN DLBCL, which was regulated by LIM homeobox 2 (LHX2) (R = 0.497, P < 0.001, positive). The potential pathway downstream of USP18 was the MAPK pathway, identified by gene set variation analysis (GSVA), gene set enrichment analysis (GSEA) and Pearson correlation analysis (R = 0.294, P < 0.05, positive). The “ssGSEA” algorithm and Pearson correlation analysis identified that activated dendritic cells (aDCs) were the cell type mostly associated with USP18 (R = 0.694, P < 0.001, positive), indicating that USP18 participated in DC-modulating immune responses. The correlations among key biomarkers were supported by multiomics database validation. Indeed, the USP18 protein was confirmed to be expressed at lower levels in tumor tissues in patients with EN DLBCL than in those with LN DLBCL by immunohistochemistry. In short, our study illustrated that the downregulation of USP18 was associated with reduced aDC number in the tumor tissues of EN DLBCL patients, indicating that targeting USP18 might serve as a promising therapy.