Water scarcity poses economic risks and affects the quality of national and regional development. The risk of local water scarcity can be conveyed to downstream economies through interregional trade for potential economic losses. However, most previous water scarcity studies focused on the availability of adequate freshwater supplies, ignoring the economic losses associated with inadequate water quality. With the aggravation of water pollution, water scarcity caused by inadequate water quality is exacerbated. This study incorporates water quality and quantity into local water scarcity risk assessments, revealing the virtual water scarcity risks and transmission pathways of the cities and sectors in the Yellow River Basin (YRB) in China. The results show that the number of cities with severe water stress increases from 13 to 53 when water quality is considered. Virtual water scarcity risks transfer from upstream cities to downstream cities in Henan and Shandong Provinces, and high-risk cities in Henan can be identified by considering water quality. Key transmission pathways for intersectoral transfer are identified. This study validates the significance of considering water quality factors in water scarcity risk assessments and provides a perspective for policy decisions to mitigate water scarcity and thus ensure water security in the YRB.