Objectives: This study aims to analyze the expression and prognostic significance of chromobox (CBX) family genes in pan cancer and to associate their roles with immune subtypes, tumor microenvironment and drug sensitivity. Methods: TCGA +GTEX method was used to analyze five members of the CBX2/4/6/7/8, Using 11,093 samples from 33 tumor types in TCGA database,to multidimensional analysis of five members of the CBX family, CBX2, CBX4, CBX6, CBX7, CBX8.including the differential expression of the CBX family in pan cancer, as well as the correlation between immune subtypes, tumor purity and stemness.Finally, the correlation data of CellMiner database was used to analyze the relationship between CBXs and drug sensitivity. Then, GO plot was performed, and GSEA analysis and weighted gene co-expression network analysis were generated. CellMiner database was used to analyze the correlation and mechanism of CBX family genes with drug sensitivity. Results: CBX 2/4/8 were highly expressed in pan-cancers. The expression level of CBX6 was heterogeneous among different tumor types, while that of CBX7 was low. The results show that CBX2, CBX4, and CBX8 are highly expressed in pan-cancer,and CBX6 is heterogeneous among different tumor types, while CBX7 is lowly expressed in almost tumor types.The expression of CBXs was correlated with the overall survival of patients, but the correlation direction depended on the cancer type. CBXs were significantly correlated with immune infiltration subtypes (P< 0.001). The expression of CBX2/CBX7s had differences in stromal cell score and RNAss stemness score. High expression of CBX82 was correlated with the high purity of most types of cancers, while CBX7 was contrary to this pattern. Rich analysis indicated that CBXs may affect the occurrence and progression of tumors by regulating RNA splicing and transcription coactivator activity. The core genes of hsa-mir-181a and EGR1 were identified in the established mRNA-TF-miRNA WGCNA network. Finally, our study revealed that CBX2 gene may be associated with sensitivity to Acrichine, Curcumin, Nelarabine, Ixabepilone, Ifosfamide, tfdu and Tamoxifen.The high expression of CBX7 was positively correlated with the drug resistance of cells to Aminoflavone, AFP464 and Lificguat.Conclusion: The CBX family showed different expression in different tumor types. CBX2 acted as an oncogene and might be overexpressed in a variety of human cancers, and CBX7 acted as a tumor suppressor gene and might become a promising therapeutic target. This study revealed multiple expression patterns of CBXs in pan cancer, providing new insights for cancer treatment, but further laboratory validation is needed.