Abstract Purpose The microbiota-gut-brain axis offers a novel framework for understanding insomnia; however, the hypothesis that specific immune pathways mediate the causal effects of gut microbial taxa on insomnia requires supporting genetic evidence. This study aimed to explore the genetic evidence supporting the causal interplay between the gut microbiota, immune phenotypes, and insomnia using large-scale genetic data.