Pennsylvanian coals represent remains of the earliest peat-forming rain forests, but there is no current consensus on forest ecology. Localized studies of fossil forests suggest intermixture of taxa (heterogeneity), while, in contrast, coal ball and palynological analyses imply the existence of pronounced ecological gradients. Here, we report the discovery of a spectacular fossil forest preserved over ∼1000 ha on top of the Pennsylvanian (Desmoinesian) Herrin (No. 6) Coal of Illinois, United States. The forest was abruptly drowned when fault movement dropped a segment of coastal mire below sea level. In the largest study of its kind to date, forest composition is statistically analyzed within a well-constrained paleogeographic context. Findings resolve apparent conflicts in models of Pennsylvanian mire ecology by confirming the existence of forest heterogeneity at the local scale, while additionally demonstrating the emergence of ecological gradients at landscape scale.