Skatole of gut origin has garnered significant attention as a malodorous pollutant due to its escalating emissions, recalcitrance to biodegradation and harm to animal and human health. Magnolol is a health-promoting polyphenol with potential to considerably mitigate the skatole production in the intestines. To investigate the impact of magnolol and its underlying mechanism on the skatole formation, in vivo and in vitro experiments were conducted in pigs. Our results revealed that skatole concentrations in the cecum, colon, and faeces decreased by 58.24% (P = 0.088), 44.98% (P < 0.05) and 43.52% (P < 0.05), respectively, following magnolol supplementation. Magnolol supplementation significantly decreased the abundance of Lachnospira, Faecalibacterium, Paramuribaculum, Faecalimonas, Desulfovibrio, Bariatricus, and Mogibacterium within the colon (P < 0.05). Moreover, a strong positive correlation (P < 0.05) between skatole concentration and Desulfovibrio abundance was observed. Subsequent in silico studies showed that magnolol could dock well with indolepyruvate decarboxylase (IPDC) within Desulfovibrio. Further in vitro investigation unveiled that magnolol addition led to less indole-3-pyruvate diverted towards the oxidative skatole pathway by the potential docking of magnolol towards IPDC, thereby diminishing the conversion of substrate into skatole. Our findings offer novel targets and strategies for mitigating skatole emission from the source.