The Imperial City is a walled fortress and palace in the city of Huế, the former imperial capital of Vietnam.

In June 1802 Nguyễn Ánh took control of Vietnam and proclaimed himself Emperor Gia Long. His rule was recognized by China in 1804. Gia Long consulted with geomancers to decide which was the best place for a new palace and citadel to be built. After the geomancers had decided on a suitable site in Huế, building began in 1804. Thousands of workers were ordered to produce a wall and moat, 10 kilometers long. Initially the walls were earthen, but later these earthen walls were replaced by stone walls, 2 meters thick