In B cells, IgD is expressed together with IgM through alternative splicing of primary VHDJH-Cμ-s-m-Cδ-s-m RNAs, and also through IgD class switch DNA recombination (CSR) via double-strand DNA breaks (DSB) and synapse of Sμ with σδ. How such DSBs are resolved is still unknown, despite our previous report showing that Rad52 effects the 'short-range' microhomology-mediated synapsis of intra-Sμ region DSBs. Here we find that induction of IgD CSR downregulates Zfp318, and promotes Rad52 phosphorylation and recruitment to Sμ and σδ, thereby leading to alternative end-joining (A-EJ)-mediated Sμ-σδ recombination with extensive microhomologies, VHDJH-Cδs transcription and sustained IgD secretion. Rad52 ablation in mouse Rad52-/- B cells aborts IgD CSR in vitro and in vivo and dampens the specific IgD antibody response to OVA. Rad52 knockdown in human B cells also abrogates IgD CSR. Finally, Rad52 phosphorylation is associated with high levels of IgD CSR and anti-nuclear IgD autoantibodies in patients with systemic lupus erythematosus and in lupus-prone mice. Our findings thus show that Rad52 mediates IgD CSR through microhomology-mediated A-EJ in concert with Zfp318 downregulation.