Many antibiotics inhibit bacterial growth by binding to the ribosome and interfering with protein biosynthesis. Macrolides represent one of the most successful classes of ribosome-targeting antibiotics. The main clinically relevant mechanism of resistance to macrolides is dimethylation of the 23S rRNA nucleotide A2058, located in the drug-binding site, a reaction catalyzed by Erm-type rRNA methyltransferases. Here, we present the crystal structure of the Erm-dimethylated 70S ribosome at 2.4 Å resolution, together with the structures of unmethylated 70S ribosome functional complexes alone or in combination with macrolides. Altogether, our structural data do not support previous models and, instead, suggest a principally new explanation of how A2058 dimethylation confers resistance to macrolides. Moreover, high-resolution structures of two macrolide antibiotics bound to the unmodified ribosome reveal a previously unknown role of the desosamine moiety in drug binding, laying a foundation for the rational knowledge-based design of macrolides that can overcome Erm-mediated resistance.