Cow dung generates globally due to increased beef and milk consumption, but its treatment efficiency remains low. Previous studies have shown that riboflavin-loaded conductive materials can improve anaerobic digestion through enhance direct interspecies electron transfer (DIET). However, its effect on the practical anaerobic digestion of cow dung remained unclear. In this study, carbon cloth loaded with riboflavin (carbon cloth-riboflavin) was added into an anaerobic digester treating cow dung. The carbon cloth-riboflavin reactor showed a better performance than other two reactors. The metagenomic analysis revealed that Methanothrix on the surface of the carbon cloth predominantly utilized the CO2 reduction for methane production, further enhanced after riboflavin addition, while Methanothrix in bulk sludge were using the acetate decarboxylation pathway. Furthermore, the carbon cloth-riboflavin enriched various major methanogenic pathways and activated a large number of enzymes associated with DIET. Riboflavin's presence altered the microbial communities and the abundance of functional genes relate to DIET, ultimately leading to a better performance of anaerobic digestion for cow dung.