The UBE2C oncogene is overexpressed in many types of solid tumours including the lethal castration-resistant prostate cancer (CRPC). The underlying mechanisms causing UBE2C gene overexpression in CRPC are not fully understood. Here, we show that CRPC-specific enhancers drive UBE2C overexpression in both AR-negative and -positive CRPC cells. We further show that co-activator MED1 recruitment to the UBE2C enhancers is required for long-range UBE2C enhancer/promoter interactions. Importantly, we find that the molecular mechanism underlying MED1-mediated chromatin looping involves PI3K/AKT phosphorylated MED1-mediated recruitment of FoxA1, RNA polymerase II and TATA binding protein and their subsequent interactions at the UBE2C locus. MED1 phosphorylation leads to UBE2C locus looping, UBE2C gene expression and cell growth. Our results not only define a causal role of a post-translational modification (phosphorylation) of a co-activator (MED1) in forming or sustaining an active chromatin structure, but also suggest that development of specific therapies for CRPC should take account of targeting phosphorylated MED1.