This study aims to explore the prokaryotic microbial community structures and diversity in pit mud from different depths, and provide a theoretical basis for the liquor production and further study of pit mud. The fermented pit muds of strong-flavor liquor from Yun distillery were taken as samples. The high-throughput sequencing approach, followed by bioinformatics analyses, was used to compare the differences in the prokaryotic microbial community between pit walls and bottom represented by samples. A total of 31 bacteria phyla and 2 archaea phyla were detected. The dominant phyla in YJ-S, YJ-Z, and YJ-X (sample name) were Proteobacteria and Firmicutes, while the dominant genera in them were Acinetobacter, Aminobacterium, and Lactobacillus. YJ-Z and YJ-X were the closest in species diversity. In species richness analysis, YJ-X was the highest, followed by YJ-Z, and YJ-S was the lowest; in species uniformity analysis, YJ-S was the highest, followed by YJ-Z, and YJ-X was the lowest. The function predicted by 16S rRNA genome showed that prokaryotic microbial function in pit mud was mainly concentrated in "Carbohydrate transport and metabolism " and "Amino acid transport and metabolism. " Significant differences in prokaryotic microbial community and gene function prediction between pit walls and bottom were found in YJ-S, YJ-Z, and YJ-X (p < 0.05).