Fecal waste from livestock farms contains numerous pathogens, and improperly managed waste may flow into water bodies, causing water-borne diseases. Along with the popularization of high-throughput technologies, community-wide microbial source-tracking methods have been actively developed in recent years. This study aimed to construct a comprehensive fecal microbiome database for community-wide microbial source tracking and apply the database to identify contamination sources in the Miho River, South Korea. Total DNA was extracted from the samples, and the 16 S rRNA gene was amplified to characterize the microbial communities. The fecal microbiome database was validated by developing machine-learning models that predict host species based on microbial community structure. All machine learning models developed in this study showed high performance, where the area under the receiver operating characteristic curve was approximately 1. Community-wide microbial source tracking results showed a higher contribution of fecal sources to the contamination of the main streams after heavy rain. In contrast, the contribution of fecal sources remained comparatively stable in tributaries after rainfall. Considering that farms are more concentrated upstream of tributaries compared to the main streams, this result implies that the pathway for manure contaminants to reach the main streams could be groundwater rather than surface runoff. Systematic monitoring of the water quality, which encompasses river water and groundwater, should be conducted in the future. In addition, continuous efforts to identify and plug abandoned wells are necessary to prevent further water contamination.