The Order Spiriferinida spanning the latest Ordovician to Early Jurassic is a small group of brachiopods overshadowed by other taxon-rich clades during the Paleozoic. It diversified significantly after the end-Permian extinction and became one of the four major clades of Triassic brachiopods. However, the phylogeny and recovery dynamics of this clade during the Triassic still remain unknown. Here, we present a higher-level parsimony-based phylogenetic analysis of Mesozoic spiriferinids to reveal their evolutionary relationships. Ecologically related characters are analyzed to indicate the variances in ecomorphospace occupation and disparity of spiriferinids through the Permian–Triassic (P-Tr) transition. For comparison with potential competitors of the spiriferinids, the pre-extinction spiriferids are also included in the analysis. Phylogenetic trees demonstrate that about half of the Mesozoic families appeared during the Anisian, indicating the greatest phylogenetic diversification at that time. Triassic spiriferinids reoccupied a large part of the ecomorphospace released by its competitor spiriferids during the end-Permian extinction; they also fully exploited the cyrtiniform region and developed novel lifestyles. Ecomorphologic disparity of the spiriferinids dropped greatly in the Early Triassic, but it rebounded rapidly and reached the level attained by the pre-extinction spiriferids in the Late Triassic. The replacement in ecomorphospace occupation between spiriferids and spiriferinids during the P-Tr transition clearly indicates that the empty ecomorphospace released by the extinction of Permian spiriferids was one of the important drivers for the diversification of the Triassic spiriferinids. The Spiriferinida took over the empty ecomorphospace and had the opportunity to flourish.