The scale of production of polystyrene has escalated in the recent past in order to meet growing demand. As a result, a large quantity of polystyrene waste continues to be generated along with associated health and environmental problems. One way to tackle such problems is to lengthen the lifetime of polystyrene, especially for outdoor applications. Our approach is the synthesis and application of new ultraviolet photostabilizers for polystyrene and this research is focused on four cephalexin Schiff bases. The reaction of cephalexin and 3-hydroxybenzaldehyde, 4-dimethylaminobenzaldehyde, 4-methoxybenzaldehyde, and 4-bromobanzaldehyde under acidic condition afforded the corresponding Schiff bases in high yields. The Schiff bases were characterized and their surfaces were examined. The Schiff bases were mixed with polystyrene to form homogenous blends and their effectiveness as photostabilizers was explored using different methods. The methods included monitoring the changes in the infrared spectra, weight loss, depression in molecular weight, and surface morphology on irradiation. In the presence of the Schiff bases, the formation of carbonyl group fragments, weight loss, and decrease in molecular weight of polystyrene were lower when compared with pure polystyrene. In addition, undesirable changes in the surface such as the appearance of dark spots, cracks, and roughness were minimal for irradiated polystyrene containing cephalexin Schiff bases. Mechanisms by which cephalexin Schiff bases stabilize polystyrene against photodegradation have also been suggested.