As the recognition of facial expressions has attracted increasing attention due to its important applications in several fields (security, human-machine interaction, marketing, etc.), thanks to the detection of different possible expressions (happiness, sadness, etc.), this technology is gaining more attention. This article presents a method for the recognition of facial expressions by exploiting spatial information. In this method, the LBP descriptor is proposed to extract local characteristics, and a hierarchical spatial pyramid model is used to capture spatial information in an image. This method enriches the semantic description of visual information, which improves the recognition rate of facial expressions. The experimental analysis was carried out on the CK+ facial expression dataset, which includes seven categories of expressions—“happy,” “sad,” “surprise,” “contempt,” “fear,” “disgust,” “anger”—and it has been given state-of-the-art performance. The recognition results of the system are very satisfactory.