This study aimed to explore the relationship among gut microbiota imbalance, the homeostasis model of assessment of insulin resistance (HOMA-IR) and cognitive impairments in patients with schizophrenia (SCZ). We conducted a case-control study involving 189 first-episode, drug-naïve SCZ patients and 115 healthy controls (HCs). Main methods adopted included metagenomics analysis, glucose metabolism assessment, and cognitive function evaluation using the MATRICS Consensus Cognitive Battery (MCCB). Fecal microbiota composition was analyzed via high-throughput sequencing of 16S ribosomal RNA. Patients with SCZ showed a higher likelihood of developing IR (23 %), compared to HCs (12 %). The IR group exhibited significantly higher levels of fasting blood glucose (FBG), fasting insulin (FINS), HOMA-IR, and homeostasis model assessment-β (HOMA-β), while showing lower insulin sensitivity index (ISI) levels (all p <
0.05). Patients with IR demonstrated lower scores in working memories (WM), verbal learning (HVLT) and reasoning and problem solving (RPS), compared to those without IR. Additionally, microbiota analysis revealed that IR patients had higher abundance of Negativicutes, Streptococcaceae, Enterobacteriaceae, Lachnoclostridium, Dialister, Klebsiella, and Enterobacter, and lower abundance of Flavonifractor and Rikenellaceae. Notably, Negativicutes, Streptococcaceae, Lachnoclostridium, Flavonifractor, and Rikenellaceae were shared between SCZ and IR conditions. Mediation analysis indicated that the relative abundance of Streptococcaceae have an indirect effect on WM through HOMA-IR (β=-0.148, SE=0.067, 95 %CI=-0.280 to -0.020). The study suggests that IR may play a mediating role in the relationship between gut microbiota dysbiosis and cognitive impairments in patients with SCZ, which could point to potential new avenues for therapeutic interventions.