The purpose of the present study was to investigate the role of the 5-Fluorouracil (5-FU) resistance-related factor dihydropyrimidine dehydrogenase (DPD) in tumor immunity and prognosis and to study the relationship between drug resistance and the immune microenvironment of colon cancer. Bioinformatics methods were used to analyze the expression of DPD associated with prognosis, immunity, microsatellite instability, and tumor mutational burden in colon cancer. Immunohistochemistry (IHC) was used to detect DPD, MLH1, MSH2, MSH6, and PMS2 in 219 colon cancer tissue samples. Additional IHC analyses were conducted to detect CD4, CD8, CD20, and CD163 in 30 colon cancer tissue samples with the most extensive immune infiltration. The significance of the correlations and clinical significance of DPD with immune infiltration, immune-related markers, microsatellite instability-related indicators, and prognosis were evaluated. The major findings of the present study are as follows: (1) DPD was expressed in tumor and immune cells and associated with certain immune cell-related markers, particularly M2 macrophages that expressed CD163. (2) DPD expression significantly and positively correlated with immune cell markers and immune checkpoints PD-1 and PD-L1. High expression of DPD in immune cells, but not tumor cells, led to increased immune infiltration. (3) High expression of DPD in immune and tumor cells induced 5-FU resistance and was associated with unfavorable prognosis. (4) DPD expression closely correlated with microsatellite instability and tumor mutational burden and led to resistance to 5-FU in patients with microsatellite instability. (5) Bioinformatics analyses revealed that DPD was enriched in immune-related functions and pathways such as activation of T cells and macrophages. DPD plays an important role in the immune microenvironment and drug resistance of colon cancers and their functional association.