The rapid growth in the number of vehicles has led to traffic congestion, pollution, and delays in logistic transportation in metropolitan areas. IoT has been an emerging innovation, moving the universe towards automated processes and intelligent management systems. This is a critical contribution to automation and smart civilizations. Effective and reliable congestion management and traffic control help save many precious resources. An IoT-based ITM system set of sensors is embedded in automatic vehicles and intelligent devices to recognize, obtain, and transmit data. Machine learning (ML) is another technique to improve the transport system. The existing transport-management solutions encounter several challenges resulting in traffic congestion, delay, and a high fatality rate. This research work presents the design and implementation of an Adaptive Traffic-management system (ATM) based on ML and IoT. The design of the proposed system is based on three essential entities: vehicle, infrastructure, and events. The design utilizes various scenarios to cover all the possible issues of the transport system. The proposed ATM system also utilizes the machine-learning-based DBSCAN clustering method to detect any accidental anomaly. The proposed ATM model constantly updates traffic signal schedules depending on traffic volume and estimated movements from nearby crossings. It significantly lowers traveling time by gradually moving automobiles across green signals and decreases traffic congestion by generating a better transition. The experiment outcomes reveal that the proposed ATM system significantly outperformed the conventional traffic-management strategy and will be a frontrunner for transportation planning in smart-city-based transport systems. The proposed ATM solution minimizes vehicle waiting times and congestion, reduces road accidents, and improves the overall journey experience.