Alternative polyadenylation (APA) is widespread in neuronal development and activity-mediated neural plasticity. However, the underlying molecular mechanisms are largely unknown. We used systematic genetic studies and genome-wide surveys of the transcriptional landscape to identify a context-dependent regulatory pathway controlling APA in the Caenorhabditis elegans nervous system. Loss of function in ssup-72, a Ser5 phosphatase for the RNA polymerase II (Pol II) C-terminal domain (CTD), dampens transcription termination at a strong intronic polyadenylation site (PAS) in unc-44/ankyrin yet promotes termination at the weak intronic PAS of the MAP kinase dlk-1. A nuclear protein, SYDN-1, which regulates neuronal development, antagonizes the function of SSUP-72 and several nuclear polyadenylation factors. This regulatory pathway allows the production of a neuron-specific isoform of unc-44 and an inhibitory isoform of dlk-1. Dysregulation of the unc-44 and dlk-1 mRNA isoforms in sydn-1 mutants impairs neuronal development. Deleting the intronic PAS of unc-44 results in increased pre-mRNA processing of neuronal ankyrin and suppresses sydn-1 mutants. These results reveal a mechanism by which regulation of CTD phosphorylation controls coding region APA in the nervous system.