This study aimed to investigate the effects of dietary fibre sources on the gut microbiota in suckling piglets, and to test the hypothesis that a moderate increase of dietary fibre may affect the gut microbiota during the suckling period. Suckling piglets were fed different fibre-containing diets or a control diet from postnatal day 7 to 22. Digesta samples from cecum, proximal colon and distal colon were used for Pig Intestinal Tract Chip analysis. The data showed that the effects of fibre-containing diet on the gut microbiota differed in the fibre source and gut location. The alfalfa diet increased Clostridium cluster XIVb and Sporobacter termitidis in the cecum compared to the pure cellulose diet. Compared to the control diet, the alfalfa diet also increased Coprococcus eutactus in the distal colon, while the pure cellulose diet decreased Eubacterium pyruvativorans in the cecum. The pure cellulose diet increased Prevotella ruminicola compared to the wheat bran diet. Interestingly, the alfalfa group had the lowest abundance of the potential pathogen Streptococcus suis in the cecum and distal colon. These results indicated that a moderate increase in dietary fibres affected the microbial composition in suckling piglets, and that the alfalfa inclusion produced some beneficial effects on the microbial communities.