East African aridifcation during the past 8 million years is frequently invoked as a driver of large-scale shifts in vegetation and the evolution of new animal lineages, including hominins. However, evidence for increasing aridity is debated and, crucially, the mechanisms leading to dry conditions are unclear. Here, numerical model experiments show that valleys punctuating the 6,000-km-long East African Rift System (EARS) are central to the development of dry conditions in East Africa. These valleys, including the Turkana Basin in Kenya, cause East Africa to dry by channelling water vapour towards Central Africa, a process that simultaneously enhances rainfall in the Congo Basin rainforest. Without the valleys, the uplift of the rift system leads to a wetter climate in East Africa and a drier climate in the Congo Basin. Results from climate model experiments demonstrate that the detailed tectonic development of Africa has shaped the rainfall distribution, with profound implications for the evolution of African plant and animal lineages.