The royal enclosure was first built during the Lý Dynasty (1010) and subsequently expanded by the Trần, Lê and finally the Nguyễn Dynasty. It remained the seat of the Vietnamese court until 1810, when the Nguyen Dynasty chose to move the capital to Huế. The ruins roughly coincide with the Hanoi Citadel today.
The royal palaces and most of the structures in Thang Long were in varying states of disrepair by the late 19th century with the upheaval of the French conquest of Hanoi. By the 20th century many of the remaining structures were torn down. Only in the 21st century are the ruin foundations of Thang Long Imperial City systematically excavated.
The central sector of the imperial citadel was listed in UNESCO's World Heritage Site on July 31, 2010 at its session in Brazil, as "The Central Sector of the Imperial Citadel of Thang Long - Hanoi".
The royal palaces and edifices were largely destroyed in the late 19th century. The few remaining structures within the royal compound are the Doan Mon gate, marking the southern entrance to the royal palace, the Flag Tower, the steps of Kinh Thiên Palace and the Hậu Lâu (Princess' Palace).
Remains of the Imperial City were discovered on the site of the former Ba Đình Hall when the structure was torn down in 2008 to make way for a new parliament building. Various archaeological remains unearthed were brought to the National Museum to be exhibited. Thus far only a small fraction of Thăng Long has been excavated.
Among the structures related to the Imperial City is the Flag Tower of Hanoi (Cột cờ Hà Nội). Rising to a height of 33.4 m (41 m with the flag), it is frequqently used as a symbol of the city. Built in 1812 during the Nguyen Dynasty, the tower, unlike many other structures in Hanoi, was spared during the French colonial rule (1885–1954) as it was used as a military post.
From 1954 to 1975, the North Vietnamese military command (Vietnam People’s Army) under General Giap, had its headquarters within the Citadel, coded D67. A connecting underground tunnel allowed for emergency evacuation in case of an attack. The house and tunnel are situated to the north of Kinh Thien hall.
To visit this historic site, tourists need to buy an entrance ticket of VND 30,000. Students and elderly people pay VND 15,000. D67 house was built in 1967, with modern architectural style, 60-centimeter wall and good soundproofing system. At this place, exhibits are tools that comrades in the Politburo and the Central Military Commission, the Ministry of Defense and the General Staff used in the resistance war against the US.
D67 used to be the military headquarters of General Giap during the war
As of 2000, some of the old French barracks and buildings were demolished to make room for a new museum within the citadel.