The majority of traditional text sentiment classification techniques rely on machine learning or sentiment dictionaries, but these approaches have the drawback of sparse data and ignore word semantics and word order information. A convolutional neural network- (CNN-) based music emotion classification model is proposed in this paper to address the aforementioned issues. The model in this paper has clear advantages in every way. On the same dataset, the model in this study has an average accuracy of 91.4 percent, while LeNet, AlexNet, and VGGNet have accuracy averages of 75.3 percent, 72.2 percent, and 79.4 percent, respectively. The error value of the other three algorithms is higher than the cost function value because people’s emotions in the cognitive field are divided into different categories. However, in the field of music emotion retrieval, we can only extract the features of the known melody and then search for the same emotion, so we need to build a computerized music emotion classifier if we want to find emotions that are similar to a particular melody. This study examines musical emotion models that already exist, then extracts musical emotion features, and builds a musical emotion classifier using a neural network. The classifier is then further trained until the error classification rate of the training samples is within a certain error range, after which the classification results are marked by pertinent feedback.