This study analyzes public emotions toward the performance of the Indonesian National Police as expressed on platform X. The research aims to develop an emotion detection system capable of capturing nuanced emotional patterns beyond simple polarity and for institutional performance evaluation. A lexicon-based framework integrating dictionary-based matching with corpus-based contextual rules is applied to Indonesian-language posts. Data were collected through web crawling, producing a balanced dataset of 2,100 posts across seven emotion categories. The analytical pipeline includes preprocessing, lexicon expansion, lexical matching, and contextual refinement using linguistic markers such as negations, conjunctions, and intensifiers. Results show that combining word-level and context-level processing improves detection accuracy, achieving 80.9%. Anger, fear, and sadness appear most frequently, indicating strong public concern over policing issues, while joy and trust also emerge in posts reflecting positive experiences. These patterns illustrate that public sentiment is multidimensional and shaped by both explicit lexical cues and contextual structures. The integrated method produces more precise and interpretable classifications, contributing to research on Indonesian social media emotion analysis. This work advances NLP by introducing a context-aware lexicon framework for Indonesian emotion analysis. The study concludes that the combined lexicon-based approach offers a robust, interpretable, and context-sensitive framework for examining public emotions and provides valuable insights into perceptions of institutional performance. The findings support applications in policy monitoring, public communication strategies, and evidence-based institutional decision-making. However, the model has limitations in capturing slang, implicit meanings, and evolving colloquial expressions in social media text; therefore, future work may explore hybrid lexicon–ML models, multimodal integration, and longitudinal analysis to capture deeper semantic dynamics.