Waste management is one of the many major challenges faced by all urban cities around the world. With the increase in population, the current mechanisms for waste collection and disposal are under strain. The waste management problem is a global challenge that requires a collaborative effort from different stakeholders. Moreover, there is a need to develop technology-based solutions besides engaging the communities and establishing novel policies. While there are several challenges in waste management, the collection of waste using the current infrastructure is among the top challenges. Waste management suffers from issues such as a limited number of collection trucks, different types of household and industrial waste, and a low number of dumping points. The focus of this paper is on utilizing the available waste collection transportation capacity to efficiently dispose of the waste in a time-efficient manner while maximizing toxic waste disposal. A novel knapsack-based technique is proposed that fills the collection trucks with waste bins from different geographic locations by taking into account the amount of waste and toxicity in the bins using IoT sensors. Using the Knapsack technique, the collection trucks are loaded with waste bins up to their carrying capacity while maximizing their toxicity. The proposed model was implemented in MATLAB, and detailed simulation results show that the proposed technique outperforms other waste collection approaches. In particular, the amount of high-priority toxic waste collection was improved up to 47% using the proposed technique. Furthermore, the number of waste collection visits is reduced in the proposed scheme as compared to the conventional method, resulting in the recovery of the equipment cost in less than a year.