She was sometimes referred to as A. Lanihau in official documents. In the Hawaiian language, the name Lanihau means "cool heaven". An ahupuaʻa of the same name was located in the district of Kona on the island of Hawaii. Lanihau was also the name of a short-lived son of Kalanimoku and his wife Likelike who died in 1821. She has also been referred to as Ana Lanihau Koakanu, Mary Lanihau or Lanihau Opeka.
Shortly after Koakanu's death, Lanihau was appointed as kahu on March 6, 1885. In 1886, Lanihau was appointed by King Kalākaua as Governess of Kauai and Niihau to succeed Paul P. Kanoa who had resigned. The appointment was chiefly influenced by the regard to her rank. She served in this position from July 31, 1886 to August 23, 1888. On August 21, 1886, the newly appointed Governess visited the town of Waimea and she was royally entertained by the residents. A grand luau was thrown by the community and the next day she made an address in the local church filled with people. In her first months in office, she made a royal tour of the island of Kauai. Like in Waimea, the people of Niimaulu, Hanalei and Wainiha gave her a positive reception and threw luaus and concerts in her honor. The Advertiser newspaper in Honolulu noted that "he Governess of Kauai has been most enthusiastically received by the people of the Island wherever she has stopped." On August 25, 1886, the newly built steamer Waialeale landed in the Nawiliwili harbor and Governess Lanihau went aboard with more than fifty of her people. Inspecting the vessel, she and her attendants were popularly received. The Advertiser noted, "Music was furnished by the ship's crew and the attendance of the Governess. The people of Kauai were reportedly delighted with the appearance of the steamer and the name given her." In October 1886, the schooner Mary C. Bohm purchased and repaired by the Inter-Island Steam Navigation Company was renamed the Lanihau for the Governess. During her governorship, Lanihau established her political seat at Koloa instead of Lihue unlike previous Kauai governors with the exception of John E. Bush who also resided in Koloa. Her gubernatorial mansion was also located at Koloa. Lanihau did not hold the post for long. Island governors traditionally had the power to appoint police officers, manage governmental lands, supervise tax collectors and collect revenues for the Crown. However, by the time of her tenure, the titular positions were mainly given to royal favorites and high ranking persons. The position had been source of corruption and was regarded as a waste of governmental money; her predecessor Paul P. Kanoa simply drew from his gubernatorial salary and made a few appointment recommendations. After the Bayonet Constitution of 1887, the legislature debated abolishing the titles. Because of her gender, Lanihau was viewed as unqualified to appoint the police forces for the island, and in 1887 this duty was transferred to the island sheriffs appointed by the Marshal of the Kingdom. Her authority to appoint chief magistrates were also taken away. In 1888, the royal island governorships were officially abolished by the Hawaiian legislature. Lanihau along with her contemporary Ululani Lewai Baker became the last female governors of the Hawaiian monarchy. During the funeral of Kalākaua in 1893, Lanihau was in attendance. Prior to Kalākaua's death, the legislature passed another act restoring the island governorships. However, section 5 of the act stated: "No female shall be eligible to the office of Governor". Under this act, Queen Liliuokalani, the sister and successor of Kalākaua, briefly restored the position during the twilight of the monarchy but only appointed males governors, who were all removed shortly after the overthrow in 1893. In 1908, Lanihau leased an acre and a quarter of land in Koloa along the Government road to Prince Jonah Kūhiō Kalanianaʻole for 30 dollars per year. In 1915, the Kauai newspaper The Garden Island remembered Lanihau as an example of female political leadership during the monarchy.