Heavy metal contamination has great ecological risk for river ecosystems due to its environmental toxicity, abundance and persistence. The examination and study of sediment quality can reveal the pollutant variations, degradations, cycles and chronic effects of water pollution. In this study, surface (0-60 mm) river sediment samples were collected and heavy metals (Cr, Cd, Hg, As, Zn, Cu and Pb) were analyzed in order to understand the spatial and temporal variation of heavy metals and its potential ecological risk in the Shenzhen River during 1991-2006. Cr showed a significant increasing trend (P < 0.05), while both As and Cd increased but not with statistical significance (P = 0.10) over time. A slightly increasing trend was found for Hg and Zn, but Pb and Cu showed no trend over time. Risk index (RI) ranged from 194.8 to 1417.6 in sediment, indicating considerable ecological risk or very high ecological risk for the aquatic environment. Among the 7 heavy metals, Cd and Hg were the major contributing (83%) elements for RI. Concentrations of heavy metals in sediment also have significant variations on spatial scale, high in industrialized and urbanized areas (Buji catchment, Futian catchment and Paihong catchment). RI ranged from 540.2 to 2876.8 for the 18 plots, and Cd was the major contributing heavy element (55.1-99.1%). The sediments of Shenzhen River all showed considerable ecological risk or very high ecological risk in 2004. (C) 2011 Elsevier Ltd and INQUA. All rights reserved.