The intestinal bacteria of insects are crucial to the growth and development of the host. It has been found that various physiological processes of insects, such as immune response, metabolism, reproductive ability, and growth and development, involve the gastrointestinal flora. However, many external factors affect the composition of insects’ intestinal microorganisms, such as the type of dietary substrate. Sarcophaga peregrina (Robineau-Desvoidy, 1830) (Diptera: Sarcophagidae) is of great significance in medicine and forensic science. In this study, we investigated the effects of ciprofloxacin on the growth and gut microbiota of S. peregrina. The results demonstrated that the maximum body length of larvae was not affected by ciprofloxacin, while the growth rate of body length quickened as the concentration of the drug increased. The weight of the pupa and adult was reduced significantly due to the effect of ciprofloxacin. After analyzing the gut microbiota composition of S. peregrina in different drug groups, it was indicated that Ignatzschineria, Providencia, Wohlfahrtiimonas, Proteus, Myroides, and Bacteroides play important roles in the growth of S. peregrina. However, they still need to be further studied. In general, ciprofloxacin can affect the gut microbial community structure, which in turn affects the fitness of the host.