Immediately before abolition, the county extended over a crescent-shaped area adjacent to, and surrounding, the southwest of Shanghai's city centre.
[1] In 1290, Busa Hanwen (僕散翰文), the Jurchen governor of Songjiang Prefecture requested that Kublai Emperor, founder of the Yuan dynasty, approve the division of Huating County into two, on the basis of administrative difficulty due to Huating's large area and dense population.
[2][3] The request was approved by the Yuan court in 1291 and Shanghai County was established in 1292.
The first permanently appointed county governor, Zhou Ruji, arrived in 1294.
In the same year, various neighbouring townships and villages were moved into Shanghai County.