Born Nguyễn Phúc Đảm at Gia Định in the middle of the Second Tây Sơn – Nguyễn Civil War, Minh Mạng was the fourth son of lord Nguyễn Phúc Ánh – future Emperor Gia Long. His mother was Gia Long’s second wife Trần Thị Đang (historically known as Empress Thuận Thiên). At the age of three, under the effect of a written agreement made by Gia Long with his first wife Tống Thị Lan (Empress Thừa Thiên), he was taken in and raised by the lord consort as her own son.
Following Thừa Thiên’s death in 1814, it was supposed that her grandson, Crown Prince Cảnh’s eldest son Mỹ Đường, would be responsible for conducting the funeral. Gia Long however, brought out the agreement to insist that Phúc Đảm, as Thừa Thiên’s son, should be the one fulfilling the duty. Despite opposition from mandarins such as Nguyễn Văn Thành, Gia Long was decisive with his selection.
In 1816, Gia Long appointed Đảm as his heir apparent. After the ceremony, Crown Prince Đảm moved to Thanh Hòa Palace and started assisting his father in processing documents and discussing country issues.
Gia Long’s death coincided with the re-establishment of the Paris Missionary Society’s operations in Vietnam, which had closed in 1792 during the chaos of the power struggle between Gia Long and the Tây Sơn brothers before Vietnam was unified. In the early years of Minh Mạng’s government, the most serious challenge came from one of his father’s most trusted lieutenants and a national hero in Vietnam, Lê Văn Duyệt, who had led the Nguyễn forces to victory at Qui Nhơn in 1801 against the Tây Sơn Dynasty and was made regent in the south by Gia Long with full freedom to rule and deal with foreign powers.