Moroni was founded by Arab settlers, possibly during the 10th century, as the capital of a sultanate connected commercially to Zanzibar in Tanzania.
An agreement on broad autonomy to the three islands was refused by the Anjouan representatives which resulted in an eruption of violence affecting Moroni in April 1999, during which Colonel Azali Assoumani assumed power in a coup d'état. In December 2003, the Moroni Agreement on Transition Agreements was signed by the island presidents of the Union of Comoros. In the run up to the 2006 elections, the government-owned
Radio Ngazidja and private station
Moroni FM were raided by armed assailants and forced off the air temporarily. In 2010, the U.S. Navy's Seabees constructed Hamramba School in Moroni as a humanitarian project, in partnership with the local military and Comoros' federal government; construction methods included mixing concrete by hand before using buckets and wheel barrels to move the concrete to the school site.