Mycotoxins are a major contaminant of pig feed and have negative effects on health and performance. The present study investigated the impact of single or repeated acute challenges with a diet naturally contaminated with deoxynivalenol (DON) and zearalenone (ZEN) on growth performances of finishing pigs and their fecal microbiota composition. A total of 160 pigs (castrated males and females) in two successive batches were randomly divided into four experimental groups of 40 pigs each. The control group received a control finisher diet from 99 to 154 days of age. Challenged groups were subjected to a 7-day acute challenge by being fed a DON- and ZEN-contaminated diet (3.02 mg DON/kg feed and 0.76 mg ZEN/kg feed) at 113 days (group DC), 134 days (group CD) or both 113 and 134 days (group DD). Microbiota composition was analyzed via 16S rRNA sequencing from fecal samples collected from the 80 females at 99, 119, 140 and 154 days. Challenged pigs (i.e. groups DC, CD and DD) reduced their average daily feed intake by 25% and 27% (P < 0.001) and feed efficiency by 34% and 28% (P < 0.05) during the first and second mycotoxin exposure, respectively. Microbiota composition was affected by mycotoxin exposure (P = 0.07 during the first exposure and P = 0.01 during the second exposure). At the family level, mycotoxin exposure significantly (P < 0.05) decreased the relative abundances of Ruminococcaceae, Streptococcaceae and Veillonellaceae and increased that of Erysipelotrichaceae at both 119 and 140 days of age. After the 7-day DON/ZEN challenge, the relative abundance of 6 to 148 operational taxonomic units (OTUs) differed among the treatment groups. However, none of these OTUs changed in all treatment groups. Using 27 functional pathways, pigs exposed to DON/ZEN challenges could be distinguished from control pigs using sparse partial least squares discriminant analysis, with a 15% misclassification rate. Regarding the functionality of these predictors, two pathways were involved in detoxifying mycotoxins: drug metabolism and xenobiotic metabolism by cytochrome P450. In challenged pigs, microbiota composition returned to the initial state within 3 weeks after the end of a single or repeated DON/ZEN challenge, highlighting the resilience of the gut microbiome. The feeding and growth performances of the pigs during challenge periods were significantly correlated with biological pathways related to health problems and modifications in host metabolism. To conclude, short-term DON/ZEN challenges resulted in transient modifications in the composition and functions of fecal microbiota.