Animal manure-based compost is a valuable organic fertilizer and biological soil amendment. To ensure the microbiological safety of compost products, the effectiveness of competitive exclusion microorganisms (CE) in reducing Escherichia coli O157:H7 in dairy manure-based compost was evaluated. A cocktail of E. coli O157:H7 strains were inoculated into dairy compost along with CE strains isolated from compost, and the reduction in E. coli O157:H7 by CE was determined in compost with 20%, 30%, and 40% moisture levels at 22 °C and 30 °C under laboratory conditions, as well as in fall, winter, and summer seasons under greenhouse settings. Under lab conditions, CE addition resulted in 1.1-3.36 log reductions in E. coli O157:H7 in compost, with enhanced pathogen reduction by higher moisture and lower temperature. In the greenhouse, >99% of the E. coli O157:H7 population in compost with ≥30% moisture due to cross-contamination can be effectively inactivated by CE within 2 days during colder seasons. However, it took ≥8 days to achieve the same level of reduction for heat-adapted E. coli O157:H7 cells. Our results demonstrated that the competitive exclusion of microorganisms can be an effective tool for controlling foodborne pathogens in compost and reducing the potential for soil and crop contamination.