This study presents an advanced methodology tailored for enhancing the performance of Intrusion Detection Systems (IDS) deployed in Internet of Things (IoT) networks within smart city environments. Through the integration of advanced techniques in data preprocessing, feature selection, and ensemble classification, the proposed approach addresses the unique challenges associated with securing IoT networks in urban settings. Leveraging techniques such as SelectKBest, Recursive Feature Elimination (RFE), and Principal Component Analysis (PCA), combined with the Gradient-Based One Side Sampling (GOSS) technique for model training, the methodology achieves high accuracy, precision, recall, and F1 score across various evaluation scenarios. Evaluation on the UNSW-NB15 dataset demonstrates the effectiveness of the proposed approach, with comparative analysis showcasing its superiority over existing techniques.