Bacterial community plays an important role in keeping the health status of the host. A study on the characteristics of gut bacterial community of sea cucumber (Apostichopus japonicus) not only helps improve the current aquaculture model, but promotes healthy and rapid development of the aquaculture industry as well. Therefore, taking pond‐cultured sea cucumber (A. japonicus) as the studying object, the metagenomic and 16S rRNA sequencing technology were used in this study to explore the characteristics of bacterial community in different parts of the gut of sea cucumber, as well as during gut regeneration after evisceration. The results showed that the compositions of bacterial community are different in varying parts of the gut of sea cucumber (A. japonicus). Specifically, bacterial community in the midgut and hindgut are highly similar, showing significantly diversified bacterial species compared to the foregut. GO annotation indicated that the foregut is associated with richer catalytic activity and binding than the midgut and the hindgut. According to the KEGG annotation, metabolism‐related genes are mainly concentrated in the foregut, while genes related to signal transduction and the immune system are mostly annotated in the midgut and hindgut. During the gut regeneration stage, the structure of bacterial community varied greatly in different stage of the regeneration stage, with significant differences between the earlier and later stage. The dominant bacteria in the earlier stage is Rubritalea, and that in the later stage is Arcobacter. Besides, there were Loktanella, Thalassobacter and Phaeobacter in the gut throughout the entire regeneration stage. Cupriavidus, Hellea, HTCC2207, Methylophaga, Methylotenera, Stenotrophomonas and Tenacibaculum were only present in the earlier stage, and gradually disappeared in the later stage due to improving gut functions. The abundance and diversity of bacteria in the gut were higher in the earlier regeneration stage than that in the later stage, with a peak between the 15th and 25th day of the regeneration stage. At 45th day, the abundance and diversity became stable.