The effects of long-term acclimatization on the optimum food waste to cow manure ratio (FW/CM) and substrate to inoculum ratio (S/I) in anaerobic codigestion with FW and CM were investigated by batch trials. For the unacclimated sludge, the highest CH 4 yields of 646.6 and 653.4 mL/g VS were achieved under the optimum FW/CM (2.5 VS/VS) and S/I (0.07 VS/VS) ratios, respectively. After more than 550 days of acclimatization, the optimum FW/CM and S/I of the acclimated sludge were improved to 3.4 and 0.68 VS/VS with more anaerobic digestion enzymes and lignocellulase, respectively. Based on high-throughput sequencing analysis, the microbial community structures of bacteria, fungi, and archaea were changed, which was the main reason for the change in the optimum FW/CM and S/I. Therefore, the FW/CM and S/I should be periodically optimized during the long-term operation of codigestion to improve the codigestion efficiency for biogas production.