Macrolide antibiotics azithromycin (AZI), erythromycin (ERY) and clarithromycin (CLA) have been recently included in the EU Watch List of contaminants of emerging concern in the aquatic environment. However, their comprehensive assessment in different environmental compartments, by including synthesis intermediates, by-products and transformation products, is still missing. In this work, a novel method, based on pressurized liquid extraction and liquid chromatography-tandem mass spectrometry, was developed and validated for the determination of such an extended range of macrolide residues in sediment and soil samples at low ng/g levels. The method was applied to determine distribution of 13 macrolides in surface and alluvial aquifer sediments collected in a small stream with a history of chronic exposure to wastewater discharges from AZI production. The total concentrations of the target macrolide compounds in surface sediments were up to 29μg/g and the most prominent individual macrolides were parent AZI, its synthesis intermediate N-demethyl AZI and transformation products decladinosyl AZI and N'-demethyl AZI. Some ERY-related compounds, originating from AZI synthesis, were also frequently detected, though at lower concentration levels (up to 0.31ng/g in total). The distribution of macrolide residues in surface sediments indicated their active longitudinal transport by resuspension and redeposition of the contaminated sediment particles. The vertical concentration profiles in stream sediments and the underlying alluvial aquifer revealed that macrolide residues reached deeper alluvial sediments (up to 5m). Moreover, significant levels of macrolides were found in groundwater samples below the streambed, with the total concentrations reaching up to 1.7μg/L. This study highlights the importance of comprehensive chemical characterization of the macrolide residues, which were shown to persist in surface and alluvial aquifer sediment more than ten years after their discharge into the aquatic environment.