CTX-M β-lactamases are prevalent antibiotic resistance enzymes and are notable for their ability to rapidly hydrolyze the extended-spectrum cephalosporin, cefotaxime. We hypothesized that the active site sequence requirements of CTX-M-mediated hydrolysis differ between classes of β-lactam antibiotics. Accordingly, we use codon randomization, antibiotic selection, and deep sequencing to determine the CTX-M active-site residues required for hydrolysis of cefotaxime and the penicillin, ampicillin. The study reveals positions required for hydrolysis of all β-lactams, as well as residues controlling substrate specificity. Further, CTX-M enzymes poorly hydrolyze the extended-spectrum cephalosporin, ceftazidime. We further show that the sequence requirements for ceftazidime hydrolysis follow those of cefotaxime, with the exception that key active-site omega loop residues are not required, and may be detrimental, for ceftazidime hydrolysis. These results provide insights into cephalosporin hydrolysis and demonstrate that changes to the active-site omega loop are likely required for the evolution of CTX-M-mediated ceftazidime resistance.