The flora of Madagascar consists of more than 12,000 species of plants, as well as a poorly known number of fungi and algae. Around 83% of Madagascar's vascular plants are found only on the island. These endemics include five plant families, 85% of the over 900 orchid species, around 200 species of palms, and such emblematic species as the traveller's tree, six species of baobab and the Madagascar periwinkle. The high degree of endemism is due to Madagascar's long isolation following its separation from the African and Indian landmasses in the Mesozoic, 150–160 and 84–91 million years ago, respectively. However, few plant lineages remain from the ancient Gondwanan flora; most extant plant groups immigrated via across-ocean dispersal well after continental break-up.
After its continental separation, Madagascar probably experienced a dry period, and tropical rainforest expanded only later in the Oligocene to Miocene when rainfall increased. Today, humid forests, including the lowland forests, are mainly found on the eastern plateau where abundant rainfall from the Indian Ocean is captured by an escarpment. A large part of the central highlands, in the sub-humid forests ecoregion, is today dominated by grasslands. They are widely seen as result of human landscape transformation but some may be more ancient. Grassland occurs in a mosaic with woodland and bushland, including tapia forest, and hard-leaved thickets on the high mountains. Dry forest and succulent woodland are found in the drier western part and grade into the unique spiny thicket in the southwest, where rainfall is lowest and the wet season shortest. Mangroves occur on the west coast, and a variety of wetland habitats with an adapted flora are found across the island.
The first human presence in Madagascar dates only 2000–4000 years back, and settlement in the interior occurred centuries later. The Malagasy people have used the native flora for various purposes, including food, construction, and medicine. Exotic plants were introduced by early settlers, later traders and French colonialists, and many have become important to agriculture. Among them are rice, the staple dish of Malagasy cuisine grown in terraced fields in the highlands, and greater yam, taro, cowpea, and plantain. Plantation crops include litchi, cloves, coffee, and vanilla, the latter one of the country's main export produce today. More than 1,300 introduced plants are known, of which around 600 have become naturalised, and some invasive.
Human population growth and economic activity have put pressure on natural vegetation in the region, especially through massive deforestation. Madagascar's high endemism and species richness coupled with a sharp decrease in primary vegetation make the island a global biodiversity hotspot. To preserve natural habitats, around 10% of the land surface is protected, including the World Heritage sites Tsingy de Bemaraha and the Rainforests of the Atsinanana. While historically mainly European naturalists described Madagascar's flora scientifically, today a number of national and international herbaria, botanical gardens and universities document plant diversity and engage in its conservation.