In this paper, we address the serious fire risks posed by Liquefied Petroleum Gas (LPG) leaks, which can lead to significant material damage and loss of life. These incidents are often caused by human error or the absence of effective early warning systems capable of timely leak detection. To tackle this issue, we have developed an automatic gas leak detection system integrated with the Internet of Things (IoT). The system utilizes the ESP32 microcontroller as the main control unit, along with an MQ2 gas sensor for detecting LPG leaks and a fire sensor for identifying fire hazards. Additional components include a fan to enhance air circulation in case of gas accumulation and an automatic water pump that activates upon fire detection, aiding in prompt fire extinguishment. The system is also equipped with an LCD to display real-time gas levels in the environment, providing visual feedback to users. For enhanced functionality, this system connects to the Blynk application, allowing remote monitoring and control via smartphone. This feature enables users to receive instant notifications upon detecting gas leaks or fires and to manually control the fan or water pump if necessary. The primary objective of this system is to provide early detection and automatic response to gas leaks and fire hazards, thereby reducing the risk of fire-related accidents. This IoT-based approach offers a reliable solution to enhance safety by ensuring rapid responses to gas leaks and fires, ultimately minimizing damage and protecting lives.