β-Lactamases and penicillin-binding proteins (PBPs) have evolved from a common ancestor. β-Lactamases are enzymes that degrade β-lactam antibiotics, whereas PBPs are involved in the synthesis and processing of peptidoglycan, which forms an elastic network in the bacterial cell wall. This study analyzed the interaction between β-lactamases and peptidoglycan and the impact on fitness and biofilm production. A representative set of all classes of β-lactamases was cloned in the expression vector pBGS18 under the control of the CTX-M promoter and expressed in Escherichia coli MG1655. The peptidoglycan composition of all clones was evaluated, and quantitative changes were found in E. coli strains expressing OXA-24, OXA-10-like, and SFO-1 (with its upstream regulator AmpR) β-lactamases; the level of cross-linked muropeptides decreased, and their average length increased. These changes were associated with a statistically significant fitness cost, which was demonstrated in both in vitro and in vivo experiments. The observed changes in peptidoglycan may be explained by the presence of residual DD-endopeptidase activity in these β-lactamases, which may result in hydrolysis of the peptide cross bridge. The biological cost associated with these changes provides important data regarding the interaction between β-lactamases and the metabolism of peptidoglycan and may provide an explanation for the epidemiology of these β-lactamases in Enterobacteriaceae.