Today, almost everything is going under automation. Air pollution has become one of the major crises across the globe. According to the report of the World Health Organization (WHO), around 580,000 people died due to air pollution. This document deals with the effective monitoring of air pollution systems. The proposed technique uses machine learning algorithms for the intelligent monitoring of air pollution. The concept of the Internet of Things (IoT) is implemented in the system to make it more reliable and accessible from anywhere throughout the world. ESP32 is used as a microprocessor for decision making purposes. The system uses Arduino software to build an algorithm. The DHT11 module is used to sense the humidity as well as temperature. MQ-2, MQ-7 and MQ-135 are used for sensing the level of methane, carbon monoxide and for measuring air quality, respectively. A buzzer is used to identify any unusual condition. Our work considers pollution caused by vehicles and provides an in-the-moment solution that does not directly monitor pollution levels, as well as control measures for reducing traffic in extremely polluted areas. This system will undoubtedly be on humans' behalf in such a way that a smart city will have much less time for spending, and there will undoubtedly be other industries, and the air will undoubtedly be extra polluted, and this device will undoubtedlyallow people to understand how safe the air is.