While both species richness and ecosystem stability increase with area, how these scaling patterns are linked remains unclear. Our theoretical and empirical analyses of plant and fish communities show that the spatial scaling of ecosystem stability is determined primarily by the scaling of species asynchrony, which is in turn driven by the scaling of species richness. In wetter regions, plant species richness and ecosystem stability both exhibit faster accumulation with area, implying potentially greater declines in biodiversity and stability following habitat loss. The decline in ecosystem stability after habitat loss can be delayed, creating a stability debt mirroring the extinction debt of species. By unifying two foundational scaling laws in ecology, our work underscores that ongoing biodiversity loss may destabilize ecosystems across spatial scales.