Prostate cancer (CaP) is mostly composed of luminal-like differentiated cells, but contains a small subpopulation of basal cells (including stem-like cells), which can proliferate and differentiate into luminal-like cells. In cancers, CpG island hypermethylation has been associated with gene downregulation, but the causal relationship between the two phenomena is still debated. Here we clarify the origin and function of CpG island hypermethylation in CaP, in the context of a cancer cell hierarchy and epithelial differentiation, by analysis of separated basal and luminal cells from cancers. For a set of genes (including GSTP1) that are hypermethylated in CaP, gene downregulation is the result of cell differentiation and is not cancer specific. Hypermethylation is however seen in more differentiated cancer cells and is promoted by hyperproliferation. These genes are maintained as actively expressed and methylation-free in undifferentiated CaP cells, and their hypermethylation is not essential for either tumour development or expansion. We present evidence for the causes and the dynamics of CpG island hypermethylation in CaP, showing that, for a specific set of genes, promoter methylation is downstream of gene downregulation and is not a driver of gene repression, while gene repression is a result of tissue-specific differentiation.