ABSTRACT The increasing volume of online reviews and tweets poses significant challenges for sentiment classification because of the difficulty in obtaining annotated training data. This paper aims to enhance sentiment classification of Twitter data by developing a robust model that improves classification accuracy and computational efficiency. The proposed method named Tree Hierarchical Deep Convolutional Neural Network optimized with Sheep Flock Optimization Algorithm for Sentiment Classification of Twitter Data (SCTD-THDCNN-SFOA) utilizes the Stanford Sentiment Treebank dataset. The process begins with pre-processing steps including Tokenization, Stop words Elimination, Filtering, Hashtag Removal, and Multiword Grouping. The Gray Level Co-occurrence Matrix Window Adaptive Algorithm is employed to extract features, such as emoticon counts, punctuation counts, gazetteer word existence, n-grams, and part of speech tags. These features are selected using Entropy–Kurtosis-based Feature Selection approach. Finally, the Tree Hierarchical Deep Convolutional Neural Network enhanced by the Sheep Flock Optimization Algorithm is used to categorize the Twitter data as positive, negative, and neutral sentiments. The proposed SCTD-THDCNN-SFOA method demonstrates superior performance, achieving higher accuracy and lesser computation time than the existing models, respectively. The SCTD-THDCNN-SFOA framework significantly improves the accuracy and efficiency of sentiment classification for Twitter data.