The gut microbiome is clearly linked to the development of various autoimmune diseases, however, its association with immune thrombocytopenia (ITP) is less well understood. The current study collected 73 samples, including 36 from healthy individuals and 37 from ITP patients. The gut microbial community was assessed using 16s rRNA sequencing. Findings illustrated that the abundance of key microbiota was significantly higher in the ITP group. This group was further divided into three subgroups that received different treatments for ITP. A random forest model was used to predict the key microbiota and the identified bacteria were shown to easily distinguish between the healthy and the ITP treatment groups. Microbial function annotation and difference analysis showed that drug treatment changed the gut microbiota and may play a role in inducing host autoimmune responses by changing microbial metabolism pathways. Clinical indices also correlated negatively with changes in the microbiota after treatment. In summary, ITP patients who received drug treatment had significant differences in their microbiota along with a high abundance of bacteria. Thus, the microbiome could be used as a biomarker to distinguish between healthy and ITB groups. The key differential bacteria could help to regulate the number of platelets in ITP patients and provide a red blood cell overstock.