Abstract Pennsylvanian coals in the Appalachian Basin host pyrite that is locally enriched in potentially toxic trace elements such as As, Se, Hg, Pb, and Ni. A comparison of pyrite-rich coals from northwestern Alabama, eastern Kentucky, and West Virginia reveals differences in concentrations and mode of occurrence of trace elements in pyrite. Pyrite occurs as framboids, dendrites, or in massive crystalline form in cell lumens or crosscutting veins. Metal concentrations in pyrite vary over all scales, from microscopic to mine to regional, because trace elements are inhomogeneously distributed in the different morphological forms of pyrite, and in the multiple generations of sulfide mineral precipitates. Early diagenetic framboidal pyrite is usually depleted in As, Se, and Hg, and enriched in Pb and Ni, compared to other pyrite forms. In dendritic pyrite, maps of As distribution show a chemical gradient from As-rich centers to As-poor distal branches, whereas Se concentrations are highest at the distal edges of the branches. Massive crystalline pyrite that fills veins is composed of several generations of sulfide minerals. Pyrite in late-stage veins commonly exhibits As-rich growth zones, indicating a probable epigenetic hydrothermal origin. Selenium is concentrated at the distal edges of veins. A positive correlation of As and Se in pyrite veins from Kentucky coals, and of As and Hg in pyrite-filled veins from Alabama coals, suggests coprecipitation of these elements from the same fluid. In the Kentucky coal samples (n = 18), As and Se contents in pyrite-filled veins average 4200 ppm and 200 ppm, respectively. In Alabama coal samples, As in pyrite-filled veins averages 2700 ppm (n = 34), whereas As in pyrite-filled cellular structures averages 6470 ppm (n = 35). In these same Alabama samples, Se averages 80 ppm in pyrite-filled veins, but was below the detection limit in cell structures. In samples of West Virginia massive pyrite, As averages 1700 ppm, and Se averages 270 ppm (n = 24). The highest concentration of Hg (≤ 102 ppm) is in Alabama pyrite veins. Improved detailed descriptions of sulfide morphology, sulfide mineral paragenesis, and trace-element concentration and distribution allow more informed predictions of: (1) the relative rate of release of trace elements during weathering of pyrite in coals, and (2) the relative effectiveness of various coal-cleaning procedures of removing pyrite. For example, trace element-rich pyrite has been shown to be more soluble than stoichiometric pyrite, and fragile fine-grained pyrite forms such as dendrites and framboids are more susceptible to dissolution and disaggregation but less amenable to removal during coal cleaning.