Certain antibiotics detected in urine are associated with childhood obesity. In the current experimental study, we investigated two representative antibiotics detected in urine, florfenicol and azithromycin, for their early effects on adipogenesis, gut microbiota, short-chain fatty acids (SCFAs), and bile acids in mice. Thirty C57BL/6 mice aged four weeks were randomly divided into three groups (florfenicol, azithromycin and control). The two experimental groups were administered florfenicol or azithromycin at 5 mg/kg/day for four weeks. Body weight was measured weekly. The composition of the gut microbiota, body fat, SCFAs, and bile acids in colon contents were measured at the end of the experiment. The composition of the gut microbiota was determined by sequencing the bacterial 16S rRNA gene. The concentration of SCFAs and bile acids was determined using gas chromatography and liquid chromatography coupled to tandem mass spectrometry, respectively. The composition of the gut microbiota indicated that the two antibiotics altered the gut microbiota composition and decreased its richness and diversity. At the phylum level, the ratio of Firmicutes/Bacteroidetes increased significantly in the antibiotic groups. At the genus level, there were declines in Christensenella, Gordonibacter and Anaerotruncus in the florfenicol group, in Lactobacillus in the azithromycin group, and in Alistipes, Desulfovibrio, Parasutterella and Rikenella in both the antibiotic groups. The decrease in Rikenella in the azithromycin group was particularly noticeable. The concentration of SCFAs and secondary bile acids decreased in the colon, but the concentration of primary bile acids increased. These findings indicated that florfenicol and azithromycin increased adipogenesis and altered gut microbiota composition, SCFA production, and bile acid metabolism, suggesting that exposure to antibiotics might be one risk factor for childhood obesity. More studies are needed to investigate the specific mechanisms.