Genome-wide studies have identified abundant small, noncoding RNAs, including small nuclear RNAs, small nucleolar RNAs (snoRNAs), cryptic unstable transcripts (CUTs), and upstream regulatory RNAs (uRNAs), that are transcribed by RNA polymerase II (pol II) and terminated by an Nrd1-dependent pathway. Here, we show that the prolyl isomerase Ess1 is required for Nrd1-dependent termination of noncoding RNAs. Ess1 binds the carboxy-terminal domain (CTD) of pol II and is thought to regulate transcription by conformational isomerization of Ser-Pro bonds within the CTD. In ess1 mutants, expression of approximately 10% of the genome was altered, due primarily to defects in termination of snoRNAs, CUTs, stable unannotated transcripts, and uRNAs. Ess1 promoted dephosphorylation of Ser5 (but not Ser2) within the CTD, most likely by the Ssu72 phosphatase. We also provide evidence for a competition between Nrd1 and Pcf11 for CTD binding that is regulated by Ess1. These data indicate that a prolyl isomerase is required for specifying the "CTD code."