Densely urbanized areas are characterized by special microclimatic conditions with typically elevated temperatures in comparison with the rural surrounding. This phenomenon is known as the urban heat island (UHI) effect, but not restricted exclusively to the atmosphere. We also find significant warming of the urban subsurface and shallow groundwater bodies. Here, main sources of heat are elevated ground surface temperatures, direct thermal exploitation of aquifers and heat losses from buildings and other infrastructure. By measuring the shallow groundwater temperature in several European cities, we identify that heat sources and associated transport processes interact at multiple spatial and temporal scales. The intensity of a subsurface UHI can reach the values of above 4 K in city centres with hotspots featuring temperatures up to +20°C. In comparison with atmospheric UHIs, subsurface UHIs represent long-term accumulations of heat in a relatively sluggish environment. This potentially impairs urban groundwater quality and permanently influences subsurface ecosystems. From another point of view, however, these thermal anomalies can also be seen as hidden large-scale batteries that constitute a source of shallow geothermal energy. Based on our measurements, data surveys and estimated physical ground properties, it is possible to estimate the theoretical geothermal potential of the urban groundwater bodies beneath the studied cities. For instance, by decreasing the elevated temperature of the shallow aquifer in Cologne, Germany, by only 2 K, the obtained energy could supply the space-heating demand of the entire city for at least 2.5 years. In the city of Karlsruhe, it is estimated that about 30% of annual heating demand could be sustainably supplied by tapping the anthropogenic heat loss in the urban aquifer. These results reveal the attractive potential of heated urban ground as energy reservoir and storage, which is in place at many places worldwide but so far not integrated in any city energy plans.