Recent studies have identified a unique subtype of cancer-associated fibroblasts (CAFs) termed antigen-presenting CAFs (apCAFs), which remain the least understood CAF subtype. To gain a comprehensive understanding of the origin and function apCAFs, we construct a fibroblast molecular atlas across 14 types of solid tumors. Our integration study unexpectedly reveals two distinct apCAF lineages present in most cancer types: one associated with mesothelial-like cells and the other with fibrocytes. Using a high-resolution single-cell spatial imaging platform, we characterize the spatial niches of these apCAF lineages. We find that mesothelial-like apCAFs are located near cancer cells, while fibrocyte-like apCAFs are associated with tertiary lymphoid structures. Additionally, we discover that both apCAF lineages can up-regulate the secreted protein SPP1, which facilitates primary tumor formation and peritoneal metastasis. Taken together, this study offers an unprecedented resolution in analyzing apCAF lineages and their spatial niches.