Recently, the population density in cities has increased at a higher pace, so waste generation is on the rise in most societies due to population growth. Given this concern, it would be highly important to manage waste generation. Intelligent city planning is necessary to improve the quality of city life and make cities more livable. This paper presents an intelligent waste management system (IWMS) in smart cities based on Internet of Things components like sensors, detectors, and actuators. IWMS contains three main phases. The first phase of the system is to adapt the low energy adaptive clustering hierarchy approach as an optimization process to better balance the energy consumption of smart waste bins (SBs), thus leading to extending the life of the smart waste network. The second phase is handling the missing values which are retrieved from SBs using an improved version of the k-nearest neighbor algorithm based on artificial hummingbird optimization (AHA), while the third phase presents an optimal energy-efficient route process for the routing of waste trucks that improves fuel efficiency and reduces the time to get an appropriate SB. According to the experimental results, the proposed system has achieved energy savings of 34% for the smart waste bin network. Moreover, compared to other systems, it has a lower mean error rate when generating missing values, and the results related to convergence and running time validate its superiority compared with other metaheuristic algorithms.