Treatment with immune checkpoint blockade (ICB) has revolutionized cancer therapy. Until now, predictive biomarkers1-10 and strategies to augment clinical response have largely focused on the T cell compartment. However, other immune subsets may also contribute to anti-tumour immunity11-15, although these have been less well-studied in ICB treatment16. A previously conducted neoadjuvant ICB trial in patients with melanoma showed via targeted expression profiling17 that B cell signatures were enriched in the tumours of patients who respond to treatment versus non-responding patients. To build on this, here we performed bulk RNA sequencing and found that B cell markers were the most differentially expressed genes in the tumours of responders versus non-responders. Our findings were corroborated using a computational method (MCP-counter18) to estimate the immune and stromal composition in this and two other ICB-treated cohorts (patients with melanoma and renal cell carcinoma). Histological evaluation highlighted the localization of B cells within tertiary lymphoid structures. We assessed the potential functional contributions of B cells via bulk and single-cell RNA sequencing, which demonstrate clonal expansion and unique functional states of B cells in responders. Mass cytometry showed that switched memory B cells were enriched in the tumours of responders. Together, these data provide insights into the potential role of B cells and tertiary lymphoid structures in the response to ICB treatment, with implications for the development of biomarkers and therapeutic targets.