In this study, 112 agricultural topsoil samples were collected from the Yarlung Zangbo River Basin (YZRB) and its two tributaries, and the concentrations, spatial distribution, source apportionment, and potential ecological risk of eight heavy metals (Cd, Hg, Pb, Cr, Cu, Zn, Ni and As) were analyzed. The mean concentrations of Cu, Pb, Zn, Cr, Ni, Cd, As, Hg and Pb were 33.91, 28.21, 86.93, 109.04, 73.58, 0.12, 21.49 and 0.05 mg/kg, respectively. Except for Pb, the concentration of heavy metals in soil exceeded the corresponding local background values, but did not exceed the national soil pollution risk screening values. In terms of spatial distribution, it showed that the heavy metals were enriched in the Nianchu River, and followed by Lhasa River and YZRB mainstream. Furthermore, the ecological risks were ordered as Hg > Cd > As > Ni > Cu > Pb > Cr > Zn, and the potential ecological risk index of the YZRB fell in the range of moderate ecological risk. The high-risk areas were in the facility agriculture fields of the Nianchu River, which was mainly related to agricultural activities. In addition, the positive matrix factorization results showed traffic, agricultural activities, natural weathering of the parent minerals, and atmospheric transport sources were the four sources in soils of the YZRB. This work will provide a scientific reference to develop appropriate pollution control measures and facility farmlands management in the YZRB of Tibetan Plateau.