When Ranavalona I became the sovereign, Andriamihaja was quickly appointed as her prime minister, as well as commander in chief of the military.[1]: 165 [2] He was also a close advisor to the queen.[1]: 165 [2] Some sources consider Andriamihaja to be the second or third chief minister of Ranavalona I, possibly succeeding Andrianamba as the leading minister to Ranavalona I,[1]: 203 but Andriamihaja is often described as the first person to hold the position of prime minister or chief minister in Madagascar.[2] The date of his selection is variously given as either 1828[2] or 1830.
Andriamihaja has been described as a reformer who was sympathetic to education expansion efforts.[2] He was also a convert to Christianity,[1]: 165 and was considered a proponent of Europeanisation.[2][3]
Andriamihaja was one of the lovers of Ranavalona I,[1]: 120 and after her accession he was sometimes viewed as functionally being her husband.[3] Andriamihaja was the father of Radama II.[1]: 120 Reportedly because of Andriamihaja's rapid rise in power from being a young military commander to becoming a primary advisor to the queen, a group of his rivals including Rainiharo and Rainiseheno [pl] accused him of treason, resulting in his execution on the orders of Ranavalona I in 1831.[1]: 120 At first, Ranavalona I only expelled him from court and stripped him of his positions, but after it was alleged that he had begun an affair with a princess, she ordered his execution.[3] Andriamihaja's support for the European powers is also thought to have been used as an instrument by his opponents to provoke his downfall.[3]
Andriamihaja was buried at Namehana in Madagascar.[2]