The effect of anoikis-related genes (ARGs) on clinicopathological characteristics and tumor microenvironment remains unclear. We comprehensively analyzed anoikis-associated gene signatures of 1057 colorectal cancer (CRC) samples based on 18 ARGs. Anoikis-related molecular subtypes and gene features were identified through consensus clustering analysis. The biological functions and immune cell infiltration were assessed using the GSVA and ssGSEA algorithms. Prognostic risk score was constructed using multivariate Cox regression analysis. The immunological features of high-risk and low-risk groups were compared. Finally, DAPK2-overexpressing plasmid was transfected to measure its effect on tumor proliferation and metastasis in vitro and in vivo. We identified 18 prognostic ARGs. Three different subtypes of anoikis were identified and demonstrated to be linked to distinct biological processes and prognosis. Then, a risk score model was constructed and identified as an independent prognostic factor. Compared to the high-risk group, patients in the low-risk group exhibited longer survival, higher enrichment of checkpoint function, increased expression of CTLA4 and PD-L1, higher IPS scores, and a higher proportion of MSI-H. The results of RT-PCR indicated that the expression of DAPK2 mRNA was significantly downregulated in CRC tissues compared to normal tissues. Increased DAPK2 expression significantly suppressed cell proliferation, promoted apoptosis, and inhibited migration and invasion. The nude mice xenograft tumor model confirmed that high expression of DAPK2 inhibited tumor growth. Collectively, we discovered an innovative anoikis-related gene signature associated with prognosis and TME. Besides, our study indicated that DAPK2 can serve as a promising therapeutic target for inhibiting the growth and metastasis of CRC.