The following is a timeline of the history of Hanoi, the capital city of Vietnam:

Prehistory

BCE — The Bronze-Age Dong Son culture of the Lac people occupies the Red River valley

Timeline of Hanoi

Van Lang

BCE — According to much later sources, the area of present-day Hanoi formed part of the Giao Chỉ region of Van Lang BCE — The Âu Việt, united under the Shu emigrant Shu Pan (), invade and conquer Van Lang

Timeline of Hanoi

Au Lac

BCE — Co Loa established by Shu Pan in the present city's Dong Anh district to serve as the capital of the unified kingdom of Au Lac

Timeline of Hanoi

Qin Empire

214 BCE — The First Emperor begins his campaign against the Baiyue () people of the south 208 BCE — General Zhao Tuo () defeats Shu Pan and takes Co Loa, incorporating it into his Nanhai Commandery

Nanyue

204 BCE — Zhao Tuo declares his realm the independent kingdom of Nanyue () 196 BCE — Lu Jia secures the nominal submission of Nanyue to Han 179 BCE — By this point, Nanyue's lands in the Red River valley have been organized as the commandery of Jiaozhi ()

Han Empire

111 BCE — The commander of Jiaozhi submits to Han following Lu Bode's razing of the capital Panyu, remaining in his post and beginning the "First Northern Domination" of Vietnam. 208 CE — Longbian () erected in its eponymous district 226 — A Roman embassy arrives

Jin dynasty

271 CE —Battle of Jiaozhi between Eastern Wu and the Jin dynasty

Liu Song Empire

454 464 — Songping (Tong Binh) established by the Liu Song on the south bank of the Red River in Hanoi's Tu Liem and Hoai Duc districts

Van Xuan

544 — Long Biên serves as the capital of Ly Bi's realm of Van Xuan

Tang Empire

621 — Longbian and Songping briefly elevated to prefectural status as Longzhou and Songzhou 722 — Songping falls to Mai Thúc Loan late 8th century — Zhang Boyi erects Luocheng (, "Enclosing Wall[ed City]") in the present city's Ba Dinh district early 9th century — Luocheng renamed Jincheng (, "Golden Wall[ed City]") 863 —Nanzhao captured Hanoi from the Tang dynasty 866 — Gao Pian, the local jiedushi, expands the fortress at Jincheng and renames it Da Luocheng (, "Big Enclosing Wall[ed City]")

Dai Viet

1010 — Luocheng renamed Thang Long with the erection of its Imperial Citadel and dedication as the capital of the Lý dynasty. Quán Thánh Temple built. 1049 — One Pillar Pagoda built. 1070 — Temple of Literature built. 1076 — Imperial Academy established. 1225 — City becomes capital of the Trần dynasty. 1258, 1285 and 1288 — the city had been sacked and burned by Mongol. All previous constructions were destroyed as the city was rebuilt later. 15th century — Temple of the Jade Mountain and Quán Sứ Temple built. 1408 — City renamed Dōngguān (, "Eastern Gateway"; Đông Quan in Vietnamese) by the Chinese Ming dynasty. 1428 — City renamed Đông Kinh (, as known by Westerners as Tonkin. 1573 — "Foggy Lake" renamed West Lake. 1615 — Trấn Quốc Pagoda relocated to West Lake. 1656 — Láng Temple renovated. 1686 — Perfume Pagoda expanded. 1730s — Trúc Lâm Palace built at Trúc Bạch Lake. 1802 — Vietnamese capital relocated to Huế. Most royal palaces were destroyed during the previous Tay Son rebellion (1771—1789). 1812 — Flag Tower built. 1831 — City renamed Hà Nội (, "Between Rivers" or "River Interior") by Nguyễn emperor Minh Mạng.