Flood disasters that often occur around the Pamarayan Dam were caused by heavy rainfall and the flow of river water in the Lebak and Bogor areas, causing the overflow of the water discharge in the dam. In addition to causing property losses, floods can also cause casualties. Therefore we need a flood detection and warning system to avoid casualties and minimize material and psychological losses. The system was built using the Internet of Things and the Message Queue Telemetry Transport (MQTT) protocol. This flood detection system is also designed to be able to deliver warnings quickly and with wide coverage. This flood detection system uses ultrasonic sensors, NodeMCU, LED, and buzzer. The ultrasonic sensor is used to measure the water level which data can be read by the NodeMCU as a data transmission medium from the sensor to the MQTT server. With this system, the water level can be monitored via the cayenne and send notifications to telegram. The LED will be green if the water is in Safe status, yellow if the alert status, and red if the danger status is accompanied by a warning alarm.