In this study, the contents of eight heavy metal(loid)s (As, Pb, Zn, Cd, Cr, Cu, Sb and Tl) in 50 sediment samples from a headwater of Beijiang River were studied to understand their pollution, ecological risk and potential sources. Evaluation indexes including sediment quality guidelines (SDGs), enrichment factor (EF), geo-accumulation index (Igeo), risk assessment code (RAC) and bioavailable metal index (BMI) were used to evaluate the heavy metal(loid)s pollution and ecological risk in the sediments. Pearson’s correlation analysis and principal component analysis were used to identify the sources of heavy metal(loid)s. The results showed that the average concentration of heavy metal(loid)s obviously exceeded the background values, except Cr. Metal(loid)s speciation analysis indicated that Cd, Pb, Cu and Zn were dominated by non-residual fractions, which presented higher bioavailability. The S content in sediments could significantly influence the geochemical fractions of heavy metal(loid)s. As was expected, it had the most adverse biological effect to local aquatic organism, followed by Pb. The EF results demonstrated that As was the most enriched, while Cr showed no enrichment in the sediments. The assessment of Igeo suggested that Cd and As were the most serious threats to the river system, while Cr showed almost no contamination in the sediments. Heavy metal(loid)s in sediments in the mining- and smelting-affected area showed higher bioavailability. According to the results of the above research, the mining activities caused heavier heavy metal(loid)s pollution in the river sediment. Three potential sources of heavy metal(loid)s in sediment were distinguished based on the Pearson’s correlation analysis and PCA, of which Cd, Pb, As, Zn, Sb and Cu were mainly derived from mining activities, Cr was mainly derived from natural sources, Tl was mainly derived from smelting activities.