Shangyu District (Chinese: 上虞区; pinyin: Shàngyú) is a district of the prefecture-level city of Shaoxing in the northeast of Zhejiang province, China. At the 2010 census, its population in the built-up (or metro) area was 779,412, up from 722,523 in the 2000 census. Shangyu is roughly fifty kilometers from north to south and about thirty kilometers from east to west. It makes up about one-fourth of the area of Shaoxing prefecture. Shangyu District is not part of the Hangzhou-Shaoxing built-up area as some countryside still prevent the city from being conurbated until now.
Shangyu's urban center, Baiguan, is located where the Cao'e River flows out of the hilly area that makes up more than half of the county, into flat alluvial land bordering Hangzhou Bay. This river, and the Cao E Temple (曹娥庙) next to it, are named after a fourteen-year-old girl who became famous in 143 AD for her filial devotion. She died in the river trying to retrieve the body of her father (Cao Xu) who drowned while officiating at a ceremony in honor of Wu Zixu who himself was famous for his filial piety.
Baiguan is about 28 kilometers east of Shaoxing's urban center. The railroad from Hangzhou to Ningbo passes through Baiguan, and the new superhighway between Hangzhou and Ningbo skirts Baiguan. Within Shangyu, just northwest of Baiguan, the Hangzhou-Ningbo highway (mostly east-west) intersects with a superhighway that goes south to the seacoast and then down the coast, through Wenzhou and Fuzhou, all the way to Guangzhou.
In the name "Baiguan" (百官) “bai” means “hundred” and “guan” means an imperial civil service official. The city came to be called this when it became famous for producing many scholars who became officials by passing the imperial civil service examination.
In the tragic legend of the Butterfly Lovers, the young lady was from Shangyu and the young gentleman was from Shaoxing.
Two books by Zhang Jinhuan (章金焕) published by the Zhejiang University Press deal with porcelain (mostly celadon) produced in the Cao'e River Valley in Shangyu starting in the Eastern Han dynasty: Shangyu Yue Kilns (上虞越窑) (2007) ISBN 978-7-308-05462-1, and Yue Porcelain Gems (越瓷瑰宝) (2009) ISBN 978-7-308-06531-3.
The Wu language is spoken in Shangyu, as it is in most of Zhejiang Province and in some surrounding areas, including Shanghai.
Shangyu has over a thousand umbrella factories; these are concentrated in Songxia, about eight kilometers northwest of Baiguan.