Rainiharo was born as Ravoninahitriniarivo into the Hova (freeman) class of the Merina people in the central highlands of Madagascar. His father, Andriantsilavonandriana, served as an adviser to the king Andrianampoinimerina. After distinguishing himself as a military officer in a series of campaigns of pacification in the southeastern part of the island, he was chosen as a spouse by Queen Ranavalona I following the death of her first husband in 1833, and was thereupon promoted to Commander-in-Chief of the military and Prime Minister of Madagascar. He retained these roles until his death in 1853, when he was interred in a distinctive tomb constructed in central Antananarivo by Frenchman Jean Laborde. This tomb would later hold the bodies of Rainiharo's two sons, Rainivoninahitriniony and Rainilaiarivony, who would each succeed him as Commander-in-Chief, Prime Minister and consort.
He was buried in Fasan-dRainiharo, Isoraka.