Cells employ transcription-coupled repair (TCR) to eliminate transcription-blocking DNA lesions. DNA damage-induced binding of the TCR-specific repair factor CSB to RNA polymerase II (RNAPII) triggers RNAPII ubiquitylation of a single lysine (K1268) by the CRL4CSA ubiquitin ligase. How CRL4CSA is specifically directed towards K1268 is unknown. Here, we identify ELOF1 as the missing link that facilitates RNAPII ubiquitylation, a key signal for the assembly of downstream repair factors. This function requires its constitutive interaction with RNAPII close to K1268, revealing ELOF1 as a specificity factor that binds and positions CRL4CSA for optimal RNAPII ubiquitylation. Drug-genetic interaction screening also revealed a CSB-independent pathway in which ELOF1 prevents R-loops in active genes and protects cells against DNA replication stress. Our study offers key insights into the molecular mechanisms of TCR and provides a genetic framework of the interplay between transcriptional stress responses and DNA replication.