Introductory paragraphDespite growing evidence that niche shifts are more common in flowering plants than previously thought, still little is known about the key physiological (e.g. photosynthesis) traits underlying such niche shifts. To address this question, we here combine a comprehensively sampled phylogeny for mostly epiphytic Malagasy Bulbophyllum orchids (c. 210 spp.) with climatic niche and carbon isotope-derived photosynthesis data to infer the groups’ spatial-temporal history and to test the role of Crassulacean Acid Metabolism (CAM), a highly water-use efficient type of photosynthesis, in facilitating niche shifts and diversification. We find that most extant species still retain niche (Central Highland) and photosynthesis (C3) states as likely present in the single mid-Miocene (c. 12.70 Ma) ancestor colonizing Madagascar. However, we also infer a major transition to CAM, linked to a late Miocene (c. 7.36 Ma) invasion of species from the sub-humid highland niche first into the island’s humid eastern coastal, and then into the seasonally dry ‘Northwest Sambirano’ rainforests, yet without significant effect on diversification rates. These findings support the rarely recognized hypothesis that CAM in tropical epiphytes may be selectively advantageous even in high rainfall habitats, rather than presenting a mere adaptation to dry environments or epiphytism per se. Overall, our study qualifies CAM as an evolutionary ‘gateway’ trait that considerably widened the spatial-ecological amplitude of Madagascar’s most species-rich orchid genus.