In sharp contrast to the numerous studies on bacteria, very little is known about the fungal community in mammalian gut. Recent studies on human and mice highlighted the importance of “mycobiota” in the metabolism and gut health of host, but our knowledge on the fungal composition and distribution in swine gut is very limited. In the current study, the fungal community in the caecal and colonic digesta from five weaned piglets was analysed based on an Illumina HiSeq 2500 platform targeting the internal transcribed spacer 1 region, and its relationship with the concentration of short‐chain fatty acids was also investigated. Results revealed that the fungal profile in the caecal and colonic digesta of the piglets was distinct, and the caecal fungal diversity was significantly higher (p < .05). Basidiomycota and Ascomycota were the two predominant fungal phyla in the caecum and colon of the piglets. Comparing with that in colon, the abundance of Saccharomycopsis, Wallemia and Mrakia showed significantly higher (p < .05), and the abundance of Scheffersomyces, Aspergillus, Penicillium and Mucor was significantly lower in the caecum (p < .05). Canonical correspondence analysis showed a correlation between the fungal community and the concentration of isobutyrate, isovalerate, propionate and acetate in the digesta samples. Spearman's correlation indicated that the low‐abundance genera, Fusarium, Plectosphaerella and Metarhizium, were positively correlated with of isobutyrate (p < .05), while Xeromyces were negatively correlated with acetate (p < .05), and Cornuvesica was negatively correlated with both acetate and propionate (p < .05). Results illuminated a probable interaction between the fungal composition and the bacterial degradation of protein and complex carbohydrates in the diet. These findings would be helpful to enhance our understanding of fungi in swine gut and provide a foundation for future work on the function of mycobiota in pigs.