There is substantial evidence demonstrating the crucial role of inflammation in oncogenesis. ANKRD1 has been identified as an anti-inflammatory factor and is related to tumor drug resistance. However, there have been no studies investigating the prognostic value and molecular function of ANKRD1 in pan-cancer. In this study, we utilized the TCGA, GTEx, GSCALite, ENCORI, CTRP, DAVID, AmiGO 2, and KEGG databases as well as R language, to explore and visualize the role of ANKRD1 in tumors. We employed the ROC curve to explore its diagnostic significance, while the Kaplan–Meier survival curve and Cox regression analysis were used to investigate its prognostic value. Additionally, we performed Pearson correlation analysis to evaluate the association between ANKRD1 expression and DNA methylation, immune cell infiltration, immune checkpoints, TMB, MSI, MMR, and GSVA. Our findings indicate that ANKRD1 expression is dysregulated in pan-cancer. The ROC curve revealed that ANKRD1 expression is highly sensitive and specific in diagnosing CHOL, LUAD, LUSC, PAAD, SKCM, and UCS (AUC > 85.0%, P < 0.001). Higher ANKRD1 expression was related to higher overall survival (OS) in LGG, but with lower OS in COAD and STAD (P < 0.001). Moreover, Cox regression and nomogram analyzes suggested that ANKRD1 is an independent factor for COAD, GBM, HNSC, and LUSC. Dysregulation of ANKRD1 expression in pan-cancer involves DNA methylation and microRNA regulation. Using the CTRP database, we discovered that ANKRD1 may influence the half-maximal inhibitory concentration (IC50) of several anti-tumor drugs. ANKRD1 expression showed significant correlations with immune cell infiltration (including cancer-associated fibroblast and M2 macrophages), immune checkpoints, TMB, MSI, and MMR. Furthermore, ANKRD1 is involved in various inflammatory and immune pathways in COAD, GBM, and LUSC, as well as cardiac functions in HNSC. In vitro experiments demonstrated that ANKRD1 promotes migration, and invasion activity, while inhibiting apoptosis in colorectal cancer cell lines (Caco2, SW480). In summary, ANKRD1 represents a potential prognostic biomarker and therapeutic target in human cancers, particularly in COAD.