Herein, we present theoretical results aimed at elucidating the origin of the kinetic preference for penicillins over cephalosporins characteristic of the TEM/SHV subgroup of class A beta-lactamases. First, we study the conformational properties of cephalothin showing that the C2-down conformer of the dihydrothiazine ring is preferred over the C2-up one by approximately 2 kcal/mol in solution (0.4-1.4 kcal/mol in the gas phase). Second, the TEM-1 beta-lactamase complexed with cephalothin is investigated by carrying out a molecular dynamics simulation. The DeltaG(binding) energy is then estimated using molecular mechanics Poisson-Boltzmann surface area (MM-PBSA) and quantum chemical PBSA (QM-PBSA) computational schemes. The preferential binding of benzylpenicillin over cephalothin is reproduced by the different energetic calculations, which predict relative DeltaDeltaG(binding) energies ranging from 1.8 to 5.7 kcal/mol. The benzylpenicillin/cephalothin DeltaDeltaG(binding) energy is most likely due to the lower efficacy of cephalosporins than that of penicillins in order to simultaneously bind the "carboxylate pocket" and the "oxyanion hole" in the TEM-1 active site.