Bacillus cereus is a common foodborne pathogen. Accidently eating food contaminated by B. cereus will cause vomiting or diarrhea, and even death in severe cases. In the present study, a B. cereus strain was isolated from spoiled rice by streak culture. The pathogenicity and drug resistance of the isolated strain were analyzed by drug sensitivity test and PCR amplification of virulence-associated gene respectively. Cultures of the purified strain were injected intraperitoneally into mice to examine their effects on intestinal immunity-associated factors and gut microbial communities, to provide references for the pathogenic mechanism and medication guidance of these spoilage microorganisms. The results showed that the isolated B. cereus strain was sensitive to norfloxacin, nitrofurantoin, tetracycline, minocycline, ciprofloxacin, spectinomycin, clindamycin, erythrocin, clarithromycin, chloramphenicol, levofloxacin, and vancomycin, but resistant to bactrim, oxacillin and penicillin G. The strain carries seven virulence-associated genes including hblA, hblC, hblD, nheA, nheB, nheC and entFM, which are involved in diarrhea-causing toxins production. After infecting mice, the isolated B. cereus strain was found to cause diarrhea in mice, and the expression levels of immunoglobulins and inflammatory factors in the intestinal mucosae of the challenged mice were significantly up-regulated. Gut microbiome analysis showed that the composition of gut microbial community in mice changed after infection with B. cereus. The abundance of the uncultured_bacterium_f_Muribaculaceae in Bacteroidetes, which is a marker of body health, was significantly decreased. On the other hand, the abundance of uncultured_bacterium_f_Enterobacteriaceae, which is an opportunistic pathogen in Proteobacteria and a marker of dysbacteriosis, was significantly increased and was significantly positively correlated with the concentrations of IgM and IgG. These results showed that the pathogenic B. cereus carrying diarrhea type virulence-associated gene can activate the immune system by altering the composition of gut microbiota upon infection.