Several studies on the role of HCA species in regulating glucose homeostasis have indicated their therapeutic value in human obesity and diabetes. There is a clear difference in the percentage of hyocholic acid (HCA) and its derivatives (also known as HCA species) in the total bile acid (BA) pool in the plasma between humans, rats and pigs. However, the role of gut microbiota in BA profiles of pigs remains unclear. We generated five germ-free pig models and six gnotobiotic pig models by fecal microbiota transplantation (FMT). A total of 46 BAs were detected in the jejunum, cecum, colon, and rectum chyme, 37 and 33 BAs were detected in bile, 33 BAs were detected in ileal chyme and liver, and 31 BAs were detected in serum. FMT increased the percentages of HCA species in total bile acids in the serum (79%), liver (78%), and bile (71%), but decreased the proportions of HCA species in the total BAs of the ileum (61%), cecum (47%), colon (51%), and rectum (57%) of pigs, as compared to GF piglets. FMT significantly induced the production of conjugated bile acids in the small intestine and increased the concentrations of free BAs in the large intestine of pigs (P < 0.01). FMT piglets had over 68-fold and 104-fold increases in conjugated BAs in the ileum compared to the germ-free piglets. FMT piglets had an expression pattern distinct from that of germ-free piglets for genes involved in bile acid receptors, synthesis, signaling, and transport. The gene expression levels of the rate-limiting enzyme CYP7A1 and the enzymes CH25H and BAAT involved in BA synthesis were significantly decreased in the liver of FMT piglets, and there was a significant reduction in the gene expression of FXR and TGR5 through the FGFR4/β-Klotho pathway that promotes the BA pool in the liver of piglets after FMT.