The rapid advancement of Internet of Things (IoT) technology has created significant opportunities to improve monitoring and control systems in the agricultural sector. One of the major challenges faced by farmers is rat pest infestation, which significantly reduces crop productivity and causes economic losses. Conventional pest control methods are often ineffective because they do not provide continuous and real-time monitoring. Therefore, this study aims to develop an ESP32-based pest detection radar integrated with IoT technology to support remote monitoring and improve agricultural pest management. This research employed the Research and Development (R&D) method, including system design, hardware implementation, software integration, and performance evaluation. The proposed system utilizes a PIR AM312 sensor to detect object movement and an HC-SR04 ultrasonic sensor to measure the distance of detected objects. Detection data are processed by the ESP32, transmitted to Firebase Realtime Database, and displayed on an Android application developed using MIT App Inventor. System testing was conducted between 7:00 PM and 9:00 PM under field conditions. The results demonstrate that the developed system successfully detected moving objects within a distance range of 16–186 cm. Ultrasonic sensor testing achieved an average error rate of 2.83% and an average accuracy of 97.17%, indicating reliable distance measurement performance. Detection data were successfully transmitted and displayed in real time through the Android application, with communication delays ranging from 1.20 to 3.56 seconds. The integration of PIR sensing, ultrasonic distance measurement, servo-based radar scanning, Firebase, and MIT App Inventor enables users to monitor object presence, distance, and direction remotely in real time. The system consumed 1.34 W of power, demonstrating its suitability for continuous monitoring applications. Overall, the developed system provides an effective IoT-based solution for real-time pest detection and monitoring in agricultural environments.