Cefalexin, also spelled cephalexin, is an antibiotic that can treat a number of bacterial infections. It kills gram-positive and some gram-negative bacteria by disrupting the growth of the bacterial cell wall. Cefalexin is a beta-lactam antibiotic within the class of first-generation cephalosporins.