Excessive accumulation of heavy metals (HMs) in sediments poses significant threats to the aquatic ecosystems. This study comprehensively determined the spatial distribution, sources, and the ecological risks of eight HMs in 85 surface sediments in the lower reach and the estuary of the Yangtze River (YR), the third longest river in the world. Our results revealed that the mean concentrations of As, Cd, Cr, Cu, Hg, Ni, Pb, and Zn in the sediments were 11.32, 0.57, 87.31, 37.39, 0.10, 34.97, 32.27, and 108.38 mg kg-1, respectively. The contamination assessment revealed that Cd and Hg were significantly higher than other HMs. Cd had a significant spatial variation, with higher concentration in riverine sediments than in estuarine sediments. The source apportionment of HMs revealed that anthropogenic activities had the highest contribution to the occurrence of HMs (78.53%), including industrial activities, shipping transportation, and agricultural production. The riverine area had a significantly higher ecological risk of HMs than the estuarine area because of its dense industrialization. Besides, the large diffusion of HMs into the ocean also substantially reduced the concentrations of HMs in estuarine sediments. Altogether, our findings provide a better understanding of the anthropogenic causes of sediment HM contamination. Hence, this work can be used as a guide to help the government efficiently prevent and control HM contamination of sediments in the study area and other similar areas.(c) 2023 The Author(s). Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).