Ulcerative colitis (UC) is a chronic, highly heterogeneous intestinal inflammation with changes in epithelial function and tissue damage. However, the pathogenesis is still unclear between active UC and inactive UC. Herein, weighted gene co-expression network analysis was applied to explore the gene modules related to active UC. Gene set enrichment analysis (GSEA) and gene set variation analysis (GSVA) were used to further investigate the underlying mechanism of selected genes. We found that in the blue module (r = -.72), carboxypeptidase A6 (CPA6) was chosen to validate because of its high intra-modular connectivity and module membership. In the test sets, the expression level of CPA6 was down-regulated in active UC compared with inactive UC and normal colon. Furthermore, CPA6 expression was decreased primarily in the descending colon and only in mucosa affected by active UC. The receiver operating characteristic curve indicated that CPA6 expression had a performed well in diagnosing active UC from inactive UC (area under the curve = 0.99). Importantly, anti-tumour necrosis factor (TNF) treatment (infliximab and golimumab) significantly increased the CPA6 expression. Finally, GSEA and GSVA found that extracellular matrix receptor, inflammatory response and epithelial-mesenchymal transition were highly enriched in active UC with low CPA6 expression. In conclusion, CPA6 was identified and validated as a novel potential biomarker for predicting the occurrence of active UC, probably through regulating extracellular matrix or immune response.