The results showed that XCL2 expression was associated with pan-cancer survival, alterations, immune infiltration, immune subtypes, and drug sensitivity. Here, XCL2 is linked to cancer.