The bromodomain-containing protein BRD4 has been thought to transmit epigenetic information across cell divisions by binding to both mitotic chromosomes and interphase chromatin. UV-released BRD4 mediates the recruitment of active P-TEFb to the promoter, which enhances transcriptional elongation. However, the dynamic associations between BRD4 and P-TEFb and BRD4-mediated gene regulation after UV stress are largely unknown. In this study, we found that BRD4 dissociates from chromatin within 30 min after UV treatment and thereafter recruits chromatin. However, P-TEFb binds tightly to chromatin right after UV treatment, suggesting that no interactions occur between BRD4 and P-TEFb within 30 min after UV stress. BRD4 knockdown changes the distribution of P-TEFb among nuclear soluble and chromatin and downregulates the elongation activity of RNA polymerase II. Inhibition of JNK kinase but not other MAP kinases impedes the interactions between BRD4 and P-TEFb. RNA-seq and ChIP assays indicate that BRD4 both positively and negatively regulates gene transcription in cells treated with UV stress. These results reveal previously unrecognized dynamics of BRD4 and P-TEFb after UV stress and regulation of gene transcription by BRD4 acting as either activator or repressor in a context-dependent manner.