The chemical reactions and pathways resulting in the formation of a beta-lactam antibiotic, any member of a class of natural or semisynthetic antibiotics whose characteristic feature is a strained, four-membered beta-lactam ring. They include the penicillins and many of the cephalosporins.