The molecule of cefalexin was investigated with the density functional theory (DFT), and the molecular geometry was optimized by utilizing b3lyp method at the levels of 6-311g(d,p). Based on the optimized geometry, the molecular orbitals, the energies levels, the highest occupied molecular orbitals (HOMO) and the lowest unoccupied molecular orbitals (LUMO), the infrared absorption spectrum (IR), the nuclear magnetic resonance (NMR), and the ultraviolet-visible absorption spectroscopy (UV-Vis) have been obtained with the density functional theory (DFT). According to the calculation results of the molecular orbitals and energies levels, the attributes of the highest occupied molecular orbitals (HOMO) and the lowest unoccupied molecular orbitals (LUMO) were discussed. The calculation results of the infrared absorption spectrum (IR), the nuclear magnetic resonance (NMR), and the ultraviolet-visible absorption spectroscopy (UV-Vis) were obtained, and the spectral data were concisely analyzed and discussed.