The aging population is a big challenge all over the world. However, there are few studies to date investigating the effects of trace element and mineral levels in drinking water and soil (especially in karst areas) on longevity. This study aims to examine temporal and spatial variations in longevity in Hechi (which is recognized as a longevity city) and to investigate relationships between longevity and trace element and mineral levels in drinking water and soils in this city (the karst landscape). Population data were collected from relevant literature and four national population censuses in 1982, 1990, 2000 and 2010. Drinking water and soil samples from Hechi were collected and analyzed. The results demonstrated an obvious clustered distribution for the longevity population in Hechi that has existed stably for decades. The longevity index tended to be significantly positively correlated with H₂SiO₃, Ca and Fe in drinking water and significantly negatively correlated with Sr in soil, indicating that drinking water characteristics contributed significantly to the observed regional longevity. The karst landscape is responsible for abundant trace elements in underground rivers in Hechi, which are beneficial to human health when consumed as drinking water. Good quality and slightly alkaline drinking water rich in trace elements such as H₂SiO₃, Ca, Fe, Na, Mg and low in heavy metals such as Pb and Cd might be an important factor contributing to the longevity phenomenon in Hechi.