Drought can profoundly alter freshwater ecosystems. Although the impacts of drought on freshwater fish have received increasing attention, our understanding of the response of fish gut microbes to drought event remains limited. We combined approaches focusing on community assembly processes and microbial core network to investigate the dynamic interactions between fish gut microbes and external environment during drought and recovery periods, and assessed the resistibility of fish gut microbes at different periods. We found that drought would decrease the diversity of fish gut microbes and affect the composition and function of microbial communities in fish gut. The exchange of microbes in fish gut and external environment compensated for the decline of gut microbial resistibility during drought. In addition, the effects of drought on fish propagated through trophic cascades. The compensation mechanism of fish gut microbes during drought reflects the adaptability of fish to different environments. Our study highlights the dynamic interactions between microbes in fish gut and external environment, and provides a new perspective for understanding the adaptability of fish to extreme environments.