1841 - 1844: Ministry of Rites and imprisonment It took him until 1841 to gain a position in the royal court in Hue. By the recommendation of
Bac Ninh Province's governor, Cao Bao Quat was appointed as a low-rank civil servant in the
Ministry of Rites and became the primary examiner in the Thừa Thiên Examination Compound. At this job, while marking exam paper, Cao Bao Quat reportedly helped candidates in whose writing he saw potential by adjusting their content that was unwittingly in violation of the exam regulations. By 1842, his deception was eventually exposed, leading to Cao Bao Quat losing his post. For his crime, Cao Ba Quat was initially sentenced to death, which then got reduced to imprisonment, including a period of exile in
Da Nang. In 1843, he was given the opportunity to go on a diplomatic mission to
Indonesia as a way to earn his pardon. The mission returned in 1844, with Cao Ba Quat successfully earning his pardon, and being given his job back. However, he was dismissed from the role shortly thereafter. Cao Ba Quat moved back to his hometown of Hanoi as a result.
1847 - 1850: Imperial Academy of Hue In 1847, Cao Ba Quat was invited to work for the Imperial Academy of Hue Court. In this role, he was tasked with collecting and cataloguing literary works. During this time, Cao Ba Quat became acquainted with influential figures in the poetry scene in Hue, and was invited to join a poetry society founded by two royal princes,
Nguyễn Phúc Miên Thẩm and
Nguyễn Phúc Miên Trinh. It was said that Cao Ba Quat did not have good relationships with senior officials of the royal court. Reportedly, this led to his redeployment to
Quoc Oai (now part of Hanoi) to work as a
Prefecture Education Commissioner in 1950. ==Mỹ Lương Uprising==