The Permian-Triassic mass extinction was the worst crisis faced by life; it killed >90% of marine species in less than 0.1 million years (Ma). However, knowledge of its macroecological impact over prolonged time scales is limited. We show that marine ecosystems dominated by non-motile animals shifted to ones dominated by nektonic groups after the extinction. In Triassic oceans, animals at high trophic levels recovered faster than those at lower levels. The top-down rebuilding of marine ecosystems was still underway in the latest Triassic, ~50 Ma after the extinction, and contrasts with the ~5-Ma recovery required for taxonomic diversity. The decoupling between taxonomic and ecological recoveries suggests that a process of vacant niche filling before reaching the maximum environmental carrying capacity is independent of ecosystem structure building.