The series of events leading to tertiary lymphoid organ (TLO) formation in mucosal organs following tissue damage remain unclear. Using a virus-induced model of autoantibody formation in the salivary glands of adult mice, we demonstrate that IL-22 provides a mechanistic link between mucosal infection, B-cell recruitment, and humoral autoimmunity. IL-22 receptor engagement is necessary and sufficient to promote differential expression of chemokine (C-X-C motif) ligand 12 and chemokine (C-X-C motif) ligand 13 in epithelial and fibroblastic stromal cells that, in turn, is pivotal for B-cell recruitment and organization of the TLOs. Accordingly, genetic and therapeutic blockade of IL-22 impairs and reverses TLO formation and autoantibody production. Our work highlights a critical role for IL-22 in TLO-induced pathology and provides a rationale for the use of IL-22-blocking agents in B-cell-mediated autoimmune conditions.