The synthesis of pre-mRNA by RNA polymerase II (Pol II) involves the formation of a transcription initiation complex, and a transition to an elongation complex1,2,3,4. The large subunit of Pol II contains an intrinsically disordered C-terminal domain that is phosphorylated by cyclin-dependent kinases during the transition from initiation to elongation, thus influencing the interaction of the C-terminal domain with different components of the initiation or the RNA-splicing apparatus5,6. Recent observations suggest that this model provides only a partial picture of the effects of phosphorylation of the C-terminal domain7,8,9,10,11,12. Both the transcription-initiation machinery and the splicing machinery can form phase-separated condensates that contain large numbers of component molecules: hundreds of molecules of Pol II and mediator are concentrated in condensates at super-enhancers7,8, and large numbers of splicing factors are concentrated in nuclear speckles, some of which occur at highly active transcription sites9,10,11,12. Here we investigate whether the phosphorylation of the Pol II C-terminal domain regulates the incorporation of Pol II into phase-separated condensates that are associated with transcription initiation and splicing. We find that the hypophosphorylated C-terminal domain of Pol II is incorporated into mediator condensates and that phosphorylation by regulatory cyclin-dependent kinases reduces this incorporation. We also find that the hyperphosphorylated C-terminal domain is preferentially incorporated into condensates that are formed by splicing factors. These results suggest that phosphorylation of the Pol II C-terminal domain drives an exchange from condensates that are involved in transcription initiation to those that are involved in RNA processing, and implicates phosphorylation as a mechanism that regulates condensate preference.