Marsupials exhibit great diversity in ecology and morphology. However, compared with their sister group, the placental mammals, our understanding of many aspects of marsupial evolution remains limited. We use 101 mitochondrial genomes and data from 26 nuclear loci to reconstruct a dated phylogeny including 97% of extant genera and 58% of modern marsupial species. This tree allows us to analyze the evolution of habitat preference and geographic distributions of marsupial species through time. We found a pattern of mesic-adapted lineages evolving to use more arid and open habitats, which is broadly consistent with regional climate and environmental change. However, contrary to the general trend, several lineages subsequently appear to have reverted from drier to more mesic habitats. Biogeographic reconstructions suggest that current views on the connectivity between Australia and New Guinea/Wallacea during the Miocene and Pliocene need to be revised. The antiquity of several endemic New Guinean clades strongly suggests a substantially older period of connection stretching back to the Middle Miocene and implies that New Guinea was colonized by multiple clades almost immediately after its principal formation.