As part of the Comoro Islands chain in the Mozambique Channel, the geology of Mayotte is virtually the same as the geology of the Comoros, the rest of the island chain which is independent of France. The island resulted from the rifting of Madagascar away from Africa as well as "hotspot" mantle plume activity, and is also impacted by seismicity and deformation associated with the East African Rift. However, because Mayotte is a part of France its geology is significantly more researched than that of other islands in the chain.

Mayotte is a primarily volcanic island rising steeply from the bed of the ocean to a height of  on Mont Bénara. Two volcanic centres are reported, a southern one (Pic Chongui, , with a breached crater to the NW, and a northern centre (Mont M'Tsapéré, ) with a breached crater to the south-east. Mont Bénara is between these two peaks, approximately at the contact point of the two structures. Volcanic activity started about 7.7 million years ago in the south, ceasing about 2.7 million years ago. In the north, activity started about 4.7 million years ago and lasted until about 1.4 million years ago. Both centres had several phases of activity. Ash bands found in the corals suggest some continuing minor activity. The most recent age reported for an ash band is 7000 year BP.

Stratigraphy and tectonics
As with other islands in the Comoros chain, Mayotte's location in the Mozambique Channel is tectonically complex, due to the displacement of the Malagasarian microcontinent from the margin of the supercontinent Gondwana.

Mesozoic
From the Permian until the Early Jurassic, the Comoros region experienced Karoo rifting, on a northeast–southwest trend. During the Middle Jurassic and Early Cretaceous, an ocean basin, running north–south, formed along the Davie Ridge.

Cenozoic
The volcanoes in the Comoros date to the recent past of the Pliocene, Pleistocene and Holocene period. 
The oldest volcano on the chain is 7.7 million years old, on Mayotte. Volcanoes are older further east. Anjouan is 3.9 million years old and Moheli is five million years old. Grande Comore is the youngest at only 10,000 years old. Some geologists have proposed that the Comoros is an example of one of 11 primary mantle plumes worldwide.

The East African Rift System became active 22 to 25 million years ago in the Miocene and its offshore extent is the youngest. The rift system causes seismicity, extensional deformation and created the offshore Kerimbas Graben.

Natural hazards
From 2002 to 2006, the French Geological Survey conducted an extensive natural hazards survey throughout the 17 districts of Mayotte and published  a hazard zonation map. Some parts of the island face threats from storm surges and landslides and areas with weathered volcanic rock face heightened risk from seismic activity.

Hydrogeology
Groundwater on Mayotte is sourced from several aquifers in the fractured basalt. The island's aquifer is one of the best studied basalt aquifers other than Hawaii and the Canary Islands. The perched aquifers are separated by units of rock that act as aquitards and aquicludes, slowing or nearly stopping the flow of water.

Natural resources
There is very little mining in Mayotte, aside from the production of building material. In some cases, coral is mined to produce lime for concrete.

Earthquake Swarm

Starting in May 2018 there have been many minor earthquakes under the eastern flank of the volcano constituting what is generally referred to as a "swarm". The exact nature of the forces behind this swarm remain unclear as of March 2019. The French government geological agency, the BRGM are maintaining a website on the events at this link. The (current, 2019) leading theory is about a combination of magma emplacement into the seabed over an extended period and a partial collapse of the magma chamber's roof, but that is still under debate. A set of seabed seismic recorders was put into the ocean in February 2019, for retrieval in about September of that year, which should give better  locations and directional "solutions" for future events. 

In November 2018 a very peculiar seismological signal was produced as part of this swarm. The November 11 2018 seismic event occurred about  east of the coast of Mayotte. It was recorded by seismograms in many place including Kenya, Chile, New Zealand, Canada, and Hawaii located almost  away. The seismic waves lasted for over 20 minutes but despite this, no one felt it.

The peculiar thing about this event is that instead of the normal range of frequencies of noise being detected, only a very narrow range was detected - the event is sometimes described by seismologists as "monochrome". In a discussion captured on Twitter, ideas were batted around about a partial collapse of a magma chamber roof, but at this time (2019-03) work continues to understand the event. Estimated depths of  to   are compatible with  a magma chamber within the volcano substructure, but other solutions for the depth of the source structure have been proposed.

The earthquake swarm is now believed to have been associated with a large submarine eruption 50 km east of the island of Petite Terre, Mayotte.

References 

Mayotte
+Mayotte
Mayotte
Geography of Mayotte
Natural history of Mayotte