As with most of modern Shanghai, the territory of Yangpu has been formed by sediments deposited by the Yangtze River over many centuries. It was probably in the shallows of the East China Sea as late as the Tang Dynasty. During the Northern Song, the Wuyu River () entered the sea somewhere around modern Wujiaochang (). Daoist and Buddhist temples are known to have been established in the vicinity around this time. In 1404, the Huangpu River shifted to its present course, entering the Yangtze River around Wusong. Toward the end of the Ming Dynasty, villages along the river flourished, engaging in agriculture, banking, textiles and water-borne trade.