There is growing interest in the role of gut microbiome composition in schizophrenia. However, lifestyle factors are often neglected, and few studies have investigated microbiome composition in treatment-resistant schizophrenia. To explore associations between the gut microbiome and schizophrenia diagnosis, treatment resistance, clozapine response, and treatment-related adverse effects while adjusting for demographic and lifestyle factors. In this case-control study of adults aged 20 to 63 years, stool samples and data on demographic characteristics, lifestyle, and medication use were collected and gut microbiome measures obtained using shotgun metagenomics. Participants with a schizophrenia diagnosis were referred through psychiatric inpatient units and outpatient clinics. Data were collected for 4 distinct groups: control individuals without a psychiatric diagnosis (past or present), individuals with treatment-responsive schizophrenia taking nonclozapine antipsychotic medications, clozapine-responsive individuals with treatment-resistant schizophrenia, and clozapine-nonresponsive individuals with treatment-resistant schizophrenia. Participants were recruited between November 2020 and November 2021. Control individuals were recruited in parallel through posters and online advertisements and matched for age, sex, and body mass index (BMI) to the individuals with schizophrenia. Participants were excluded if taking antibiotics in the past 2 months, if unable to communicate in English or otherwise follow study instructions, were pregnant or planning to become pregnant, or had any concomitant disease or condition making them unsuited to the study per investigator assessment. Data were analyzed from January 2022 to March 2023. Omics relationship matrices, α and β diversity, and relative abundance of microbiome features. Data were collected for 97 individuals (71 [74%] male; mean [SD] age, 40.4 [10.3] years; mean [SD] BMI, 32.8 [7.4], calculated as weight in kilograms divided by height in meters squared). Significant microbiome associations with schizophrenia were observed at multiple taxonomic and functional levels (eg, common species: b2, 30%; SE, 13%; adjusted P = .002) and treatment resistance (eg, common species: b2, 27%; SE, 16%; adjusted P = .03). In contrast, limited evidence was found for microbiome associations with clozapine response, constipation, or metabolic syndrome. Significantly decreased microbial richness was found in individuals with schizophrenia compared to control individuals (t95 = 4.25; P < .001; mean [SD] for control individuals, 151.8 [32.31]; mean [SD] for individuals with schizophrenia, 117.00 [36.2]; 95% CI, 18.6-51.0), which remained significant after a covariate and multiple comparison correction. However, limited evidence was found for differences in β diversity (weighted UniFrac) for schizophrenia diagnosis (permutational multivariate analysis of variance [PERMANOVA]: R2, 0.03; P = .02), treatment resistance (R2, 0.02; P = .18), or clozapine response (R2, 0.04; P = .08). Multiple differentially abundant bacterial species (19) and metabolic pathways (162) were found in individuals with schizophrenia, which were primarily associated with treatment resistance and clozapine exposure. The findings in this study are consistent with the idea that clozapine induces alterations to gut microbiome composition, although the possibility that preexisting microbiome differences contribute to treatment resistance cannot be ruled out. These findings suggest that prior reports of microbiome alterations in individuals with chronic schizophrenia may be due to medication or lifestyle factors and that future studies should incorporate these variables in their design and interpretation.