The water–energy nexus (WEN) is dynamic and complicated in megacities, most of which are challenged by water scarcity and the mandate to reduce energy consumption. A salient feature of water and energy services in megacities is that they are supported by a web of regional infrastructure, extending far beyond the geographic boundaries of the cities, resulting in a strong dependence on resources imported from outside. Understanding the WEN of megacities has implications not only for more efficient resource utilization but also for synergistic regional development and corporation. This study provides a quantitative assessment of the WEN of Beijing within and beyond its geographic boundaries. Results show that water for local internal energy production and transformation accounts for 220 million m
3
/year, or 5.6% of its total freshwater use in 2016, and the energy for local water abstraction, supply, and treatment is 3.06 billion kWh, accounting for 1.1% of its total energy consumption for the same year. The external water for “imported” energy is 290 million m
3
/year, 1.3 times of Beijing's freshwater use for internal energy. This means that more water for energy is consumed outside Beijing than that within Beijing. The energy for external water is negligible because the bulk of the water transfer into Beijing relies on gravity and because the energy for construction of the transfer infrastructure is not included. Analysis of the WEN revealed the contradiction between the two independently conceived policies of Beijing: to meet the “three-red-line” target in the water sector, recycled water and transferred water use will rise, making it more difficult to meet the carbon emission control targets. Therefore, adopting low energy intensity, nature-based water recycling is a wise policy choice.