Aryl hydrocarbon receptor (AhR) is a ligand-activated transcription factor that regulates T cell function. The aim of this study was to investigate the effects of AhR ligands, 2,3,7,8-Tetrachlorodibenzo-p-dioxin (TCDD), and 6-Formylindolo[3,2-b]carbazole (FICZ), on gut-associated microbiota and T cell responses during delayed-type hypersensitivity (DTH) reaction induced by methylated bovine serum albumin (mBSA) in a mouse model. Mice with DTH showed significant changes in gut microbiota including an increased abundance of Bacteroidetes and decreased Firmicutes at the phylum level. Also, there was a decrease in Clostridium cluster XIV and IV, which promote anti-inflammatory responses, and an increase in Prevotella copri that facilitates pro-inflammatory responses. Interestingly, treatment of mice with TCDD attenuated the DTH response, induced Tregs, suppressed Th17 cells in the mesenteric lymph nodes (MLNs), and reversed the gut microbiota composition toward normalcy. In contrast, FICZ exacerbated the DTH response, induced heightened Th17 cells, and failed to cause a major shift in gut microbiota. Furthermore, TCDD but not FICZ caused an increase in the levels of short-chain fatty acids (SCFA), n-butyric acid, and acetic acid. Administration of sodium butyrate into mice with DTH suppressed the response, increased Tregs, and reduced Th17 cells IL17. Butyrate also caused an increase in the abundance of Clostridium and a decrease in Prevotella. Lastly, TCDD, as well as butyrate but not FICZ, were able to inhibit proinflammatory Histone deacetylases (HDACs) class I and II. Together, our data suggest that AhR ligands, such as TCDD that suppress DTH response, may mediate this effect by reversing the gut dysbiosis induced during this inflammatory response, while FICZ may fail to suppress the DTH response because of its inability to overturn the dysbiosis.