Resistance of Neisseria gonorrhoeae to extended-spectrum cephalosporins (ESCs) has become a major threat to human health. The primary mechanism by which N. gonorrhoeae becomes resistant to ESCs is by acquiring a mosaic penA allele, encoding penicillin-binding protein 2 (PBP2) variants containing up to 62 mutations compared with WT, of which a subset contribute to resistance. To interpret molecular mechanisms underpinning cephalosporin resistance, it is necessary to know how PBP2 is acylated by ESCs. Here, we report the crystal structures of the transpeptidase domain of WT PBP2 in complex with cefixime and ceftriaxone, along with structures of PBP2 in the apo form and with a phosphate ion bound in the active site at resolutions of 1-7-1.9 Å. These structures reveal that acylation of PBP2 by ESCs is accompanied by rotation of the Thr-498 side chain in the KTG motif to contact the cephalosporin carboxylate, twisting of the β3 strand to form the oxyanion hole, and rolling of the β3-β4 loop toward the active site. Recognition of the cephalosporin carboxylate appears to be the key trigger for formation of an acylation-competent state of PBP2. The structures also begin to explain the impact of mutations implicated in ESC resistance. In particular, a G545S mutation may hinder twisting of β3 because its side chain hydroxyl forms a hydrogen bond with Thr-498. Overall, our data suggest that acylation is initiated by conformational changes elicited or trapped by binding of ESCs and that these movements are restricted by mutations associated with resistance against ESCs.