Taiwan is located in a high-risk area for natural disasters. In recent years, violent natural disasters have occurred in Taiwan. Numerous disasters—such as flooding, surges of river water level, and earth and rock disasters—are caused by instant heavy rainfall. These disasters cause considerable loss of lives and property. Current disaster warning systems can only provide warnings to large areas and not to specific small areas. Therefore, the current study developed a disaster warning system based on machine learning for evaluating the likelihood of earth and rock disasters so that an early warning can be provided to people who may be affected by these disasters. In contrast to previous relevant studies, which have mostly used regional assessment methods, no large-scale regional simulation was conducted in the present study. Instead, a comprehensive debris flow evaluation model based on information related to soil flow, rock flow, typhoons, and rainfall history was established to provide warnings regarding debris flow disasters. The geological condition, rainfall, soil moisture and river water level in 1-h intervals were evaluated using the K-nearest neighbor algorithm, providing people earth and rock flow information for the area around their homes. Data related to Typhoon Kameiji, Typhoon Xinleke, Typhoon Morak, Typhoon Sura, Typhoon Megi, and the 0823 Tropical depression were used as training data for the developed model, and data related to Typhoon Megi and Typhoon Kangrui were used as testing data. The proposed model can provide earlier warnings than can the Taiwanese government's soil and stone flow warning system. The developed model was used to create a mobile phone application that presents comprehensive and easy-to-understand data on the debris flow warning level, hourly rainfall, total rainfall, and geological conditions in real time.