Basal cell carcinoma (BCC) is the most common type of non-melanoma skin cancer (NMSC). However, few biomarkers have been developed for the diagnosis of BCC. This study aimed to uncover novel BCC biomarkers for diagnosis and treatment via transcriptome and pathogenesis investigations. Microarray datasets of BCC tissues were downloaded from the Gene Expression Omnibus (GEO) database and differentially expressed genes (DEGs) were identified. A total of 558 DEGs were identified between BCC and normal samples from the GSE125285 and GSE42109 datasets. 69 DEGs were expressed in a tissue/organ-specific manner, of which three tissue-specific key genes were finally identified. The three genes showed high performance for BCC diagnosis with AUCs of ≥0.8, indicating that they have high diagnostic significance. CIBERSORT analysis revealed an increase in resting NK cells, M1 macrophages and a decrease in dendritic cells in the immune microenvironment of BCC patients. In addition, versican (VCAN) may be involved in the polarization of M1 macrophages in skin cancer. When VCAN was knocked down, the skin cancer cell line A431 was weakened in terms of proliferation, migration and invasion. Meanwhile, the expression of the key oncogenic factors DDX5 was also reduced and apoptosis was promoted through the BAX/BCL-2/c-Caspase3 pathway. The cell-derived xenograft model study in nude mice showed that knockdown of VCAN in tumour cells significantly suppressed tumour size compared to control tumour cells, suggesting that VCAN is one of the important genes for tumourigenesis. Meanwhile, we examined the level of macrophage M1 polarization in tumour samples from a cell-derived xenograft mouse model, and VCAN knockdown significantly reduced macrophage M1 polarization compared to controls. We also detected the expression of VCAN in tumour samples from BCC patients and verified that VCAN expression was significantly higher in BCC than in normal skin tissue. Thus, VCAN could be a potential clinical target for the diagnosis and treatment of BCC.