Objective The relationships between gut microbiota and brain-related diseases/traits remains not fully understood.Method A two-stage study was performed to investigate the relationships between gut microbiota and brain-related diseases/traits, and evaluate the potential sex specific effects of gut microbiota. In discovery stage, we systematically scanned the relationships between 515 brain-related diseases/traits and gut microbiota through two-sample Mendelian randomisation analysis. Using ∼500,000 individuals derived from the UK Biobank, polygenetic risk scoring (PRS) analysis was performed to validate the associations detected in discovery stage. To evaluate the potential sex-specific effect of gut microbiota on brain-related disorders, PRS analysis was conducted in female and male, respectively.Results After systematically scanning diseases or traits, 41 of the 515 brain-related diseases/traits were identified to be associated with gut microbiota, such as Neuroticism score (P2-MR = 0.0018), worrier/anxious feelings (P2-MR = 0.0013), Suffer from ‘nerves’ (P2-MR = 0.0062) and Nervous feelings (P2-MR = 0.0158). 5 of 41 brain-related diseases or traits were successfully validated in UK Biobank, such as Neuroticism score (PUK = 0.0024, PUK-female = 0.0063, PUK-male = 0.1142), Nervous feelings (PUK = 0.0043, PUK-female = 0.0115, PUK-male = 0.1670) and Worrier/anxious feelings (PUK = 0.0166, PUK-female = 0.0196, PUK-male = 0.2930).Conclusion Our results suggest that gut microbiota contributed more to brain-related diseases or traits in females than in males.Key pointsA two-stage study was performed to investigate the relationships between gut microbiota and brain-related diseases/traits.Using the individuals derived from the UK Biobank, polygenetic risk scoring analysis was performed to validate the associations detected in the discovery stage.Our results suggest that gut microbiota contributed more to brain-related diseases or traits in females than in males.