Inulin is considered an efficient prebiotic and is beneficial for metabolic diseases via promoting intestinal probiotic enrichment and the metabolites of short-chain fatty acids (SCFAs). However, the effect of inulin on patients with InR deficiencies has seldom been reported. In this study, the lifespan, related gene expression, and gut microbiota of InRp5545/TM3 (insulin receptor mutant) Drosophila melanogaster under inulin treatment were investigated. The results showed that the lifespan was extended in only males and not in females. Furthermore, distinctly different patterns of gene expression were found between males and females, especially in the insulin/insulin-like growth factor (IGF)-like signalling (IIS) and target of rapamycin (TOR) pathways. Additionally, as a link between inulin and lifespan responses, the gut microbiota was distinctly separated by gender in both the standard diet group and the inulin treatment group, and the relationship between lifespan and the gut microbiota community was stronger in male flies than in females. This study provides preliminary evidence for the gender-dependent lifespan responses to inulin in insulin signalling-deficient Drosophila. However, controls such as wild-type and TM3 flies, and more InR mutant strains with different genetic backgrounds need to be further investigated to elucidate the mechanisms underlying the phenomenon.