Colitis is a frequently occurred side effect of immune checkpoint inhibitors (ICIs), which are increasingly used in cancer treatment, whereas antibiotics are widely used to treat colitis, their effectiveness in ICI-associated colitis remains controversial. In this study, we firstly assessed the effectiveness of several commonly used antibiotics and antibiotic cocktails in alleviating of dextran sulfate sodium- (DSS-) induced colitis. We observed that two narrow-spectrum antibiotics, neomycin and metronidazole, were more effective in alleviating colitis, as evidenced by the remission of loss of the body weight, enlargement of the spleen, shortening of the colon, secretion of proinflammatory cytokines, and histological score of the colon tissue. Moreover, these two antibiotics resulted in better relief of colitis symptoms in the MC38 tumor-bearing male mice receiving the anti-PD-L1 mAb (α PD-L1) treatment, compared to the females. In the meantime, an enhanced response to α PD-L1 efficiency against mice colon cancer was observed in the male mouse group upon the application of these two antibiotics. In contrast, both neomycin and metronidazole showed destructive effects on the antitumor efficiency of α PD-L1 in female mice, despite relief from colitis. We found that antibiotic treatment attenuated the increased infiltration of granulocytes and myeloid cells in colon tissue induced by DSS in female mice, while reducing the proportion of Th17 cells in male mice. These differences were further associated with the sex-biased differences in the gut microbiota. These findings indicated that sex-dependent alterations in the gut microbiota should be considered when applying antibiotics for the treatment of ICI-associated colitis.