Neuromyelitis optica is a paradigmatic autoimmune disease of the central nervous system, in which the water-channel protein AQP4 is the target antigen1. The immunopathology in neuromyelitis optica is largely driven by autoantibodies to AQP42. However, the T cell response that is required for the generation of these anti-AQP4 antibodies is not well understood. Here we show that B cells endogenously express AQP4 in response to activation with anti-CD40 and IL-21 and are able to present their endogenous AQP4 to T cells with an AQP4-specific T cell receptor (TCR). A population of thymic B cells emulates a CD40-stimulated B cell transcriptome, including AQP4 (in mice and humans), and efficiently purges the thymic TCR repertoire of AQP4-reactive clones. Genetic ablation of Aqp4 in B cells rescues AQP4-specific TCRs despite sufficient expression of AQP4 in medullary thymic epithelial cells, and B-cell-conditional AQP4-deficient mice are fully competent to raise AQP4-specific antibodies in productive germinal-centre responses. Thus, the negative selection of AQP4-specific thymocytes is dependent on the expression and presentation of AQP4 by thymic B cells. As AQP4 is expressed in B cells in a CD40-dependent (but not AIRE-dependent) manner, we propose that thymic B cells might tolerize against a group of germinal-centre-associated antigens, including disease-relevant autoantigens such as AQP4.