Insects have a long history of being used in medicine, with clear primary and secondary functions and less side effects, and the study and exploitation of medicinal insects have received increasing attention. Insects gut microbiota and their metabolites play an important role in protecting the hosts from other potentially harmful microbes, providing nutrients, promoting digestion and degradation, and regulating growth and metabolism of the hosts. However, there are still few studies linking the medicinal values of insects with their gut microbes. In this study, we focused on the specific gut microbiota common to medicinal insects, hoping to trace the potential connection between medicinal values and gut microbes of medicinal insects. Based on 16S rRNA gene sequencing data, we compared the gut microbiota of medicinal insects [Periplaneta americana, Protaetia (Liocola) brevitarsis (Lewis) and Musca domestica], in their medicinal stages, and non-medicinal insects (Hermetia illucens L., Tenebrio molitor, and Drosophila melanogaster), and found that the intestinal microbial richness of medicinal insects was higher, and there were significant differences in the microbial community structure between the two groups. We established a model using a random-forest method to preliminarily screen out several types of gut microbiota common to medicinal insects that may play medicinal values: Parabacteroides goldsteinii, Lactobacillus dextrinicus, Bifidobacterium longum subsp. infantis (B. infantis), and Vagococcus carniphilus. In particular, P. goldsteinii and B. infantis were most probably involved in the anti-inflammatory effects of medicinal insects. Our results revealed an association between medicinal insects and their gut microbes, providing new development directions and possibly potential tools for utilizing microbes to enhance the medicinal efficacy of medicinal insects.