Ngô Quyền was born in 897 AD in Đường Lâm (modern-day Ba Vì District, Hanoi of northern Vietnam) during the Tang dynasty. He was the son of Ngô Mân, an influential Tang government official in Annam. His father was a strong supporter of Phùng Hưng, the first Jiedushi (Tiết độ sứ) military governor of Annam and semi-autonomous ruler when the Tang empire was in decline.
In 931, he served under Dương Đình Nghệ (the administrator of Zhou Cho Giao Chỉ in around 931 AD) and quickly rose through the military ranks and government administration, by 934, he was promoted military governor of Ái Châu. After Dương Đình Nghệ was assassinated in a military coup in 938 by a usurper named Kiều Công Tiễn, he took control of the military and was well received. That same year, Ngô Quyền's forces defeated the rebel Kiều Công Tiễn and had him executed. This transpired into an opportunistic pretense for wrestling control of Annam by the new Southern Han regime due to its strategic geographical location. Ngô Quyền foresaw the Southern Han intention. He quickly mobilized the armed forces and made war preparations well in advance. His victory at the Battle of Bach Dang paved the way for Annam independence (future Vietnam).
Ngô Quyền was declared King and was officially recognized by the Southern Han in 939. In the process, Annam (future Vietnam) gained full independence and governmental autonomy ever since (with the exception of a short period of 20 years under military occupation by the Ming dynasty in the early 15th century).