Much attention has been paid to burden shifting of CO2 emissions from developed regions to developing regions through trade. However, less discussed is that trade also acts as a mechanism enabling wealthy consumers to shift water quantity and quality stress to their trading partners. In this study, we investigate how Shanghai, the largest megacity in China, draws water resources from all over China and outsources its pollution through virtual quantity and quality water flows associated with trade. The results show that Shanghai's consumption of goods and services in 2007 led to 11.6 billion m(3) of freshwater consumption, 796 thousand tons of COD, and 16.2 thousand tons of NH3-N in discharged wastewater. Of this, 79% of freshwater consumption, 82.9% of COD and 82.5% of NH3-N occurred in other Chinese Provinces which provide goods and services to Shanghai. Thirteen Provinces with severe and extreme water quantity stress accounted for 60% of net virtual water import to Shanghai, while 19 Provinces experiencing water quality stress endured 79% of net COD outsourcing and 75.5% of net NH3-N outsourcing from Shanghai. In accordance with the three redlines recently put forward by the Chinese central government to control water pollution and cap total water use in all provinces, we suggest that Shanghai should share its responsibility for reducing water quantity and quality stress in its trading partners through taking measures at provincial, industrial, and consumer levels. In the meantime, Shanghai needs to enhance demand side management by promoting low water intensity consumption.