More Than a Gut Feeling: How Your Microbiome Affects Your Mood

By Maya Shetty, BS

Key Takeaways: 

  • The gut and brain are in constant communication through the gut-brain axis, which involves the nervous system, endocrine system, metabolic system, and immune system pathways.
  • Gut microbes produce neurotransmitters, hormones, and metabolites that can affect our emotions, thought processes, and behaviors.
  • Eating foods high in probiotics (such as fermented foods) and prebiotics (such as high-fiber foods) can improve the gut microbiome and mental health.
  • Processed food consumption negatively alters the gut microbiome, leading to adverse mental health effects via the gut-brain connection. 
  • In addition to diet, meditation and cognitive-behavioral therapy have shown to improve the gut microbiota composition, positively influencing the gut-brain axis.

When it comes to mood swings and mental state, the brain is often the first suspect. Yet, the trillions of microbes living in our gut, known as our microbiome, hold significant sway over our daily emotions and long-term mental health. This is because our microbiome and brain are in constant communication, influencing one another’s next move via the gut-brain axis.

“The complex interplay between our microbiome and brain is a testament to the body’s remarkable interconnectedness. It’s not just about gut health or mental health; it’s about how each influences the other in profound ways,” states Sean Spencer, MD, PhD, Gastroenterologist and Physician Scientist at Stanford University. 

The Gut-Brain Axis

The gut-brain axis represents a bidirectional communication system that intricately links the brain’s emotional and cognitive centers with the digestive system’s physiological processes. This complex network connects the central nervous system (CNS)—comprising the brain and spinal cord—and the enteric nervous system (ENS) within the gut using biochemical and physical pathways.

The ENS is an elaborate mesh-like system embedded in the gut lining, housing an astonishing 200 to 600 million neurons. Dubbed our “second brain,” this vast neural network, which spans from the esophagus to the rectum, contains many of the same structural elements as the brain.

“Our gut can be thought of as having its own brain, replete with motor neurons, sensory neurons, and neurotransmitters. In fact, our ‘gut brain’ contains more of some neurotransmitters, like serotonin, than the brain in our head,” states Dr. Spencer.

Instead of processing thoughts and emotions, our second brain focuses on orchestrating the digestion of food, absorption of nutrients, and intestinal motility (the movement of material from one end to the other). This unique system is equipped with its own reflexes and sensory capabilities, enabling it to adapt to the gut’s distinct conditions in real-time, independent from the brain’s oversight. In fact, studies have found the gut could still operate without direction from the brain. Under normal conditions, however, our gut and brain lean on each other to maintain homeostasis throughout the body using their intricate communication network.

The Vagus Nerve

The vagus nerve, one of the longest nerves in the body, forms the most direct link between the brain and the gut. It begins at the brainstem and stretches down to the abdomen, interfacing with various organs throughout its path. This nerve acts as a bidirectional channel, enabling the rapid exchange of signals from the brain to the gut and vice versa. 

Beyond the anatomical connection through the vagus nerve, the communication between the brain and gut includes endocrine (hormonal signals), metabolic, and immune routes. This continuous communication allows the brain and gut to be in sync. This expansive network highlights the gut-brain axis’s complexity, integrating diverse physiological signals to maintain mind and body balance.

The Microbiome’s Role in Mood

The key signaling molecules involved in the gut-brain axis are produced by the trillions of microbes making up our microbiome.  These microbes exist alongside the intestinal cells of the gut, which contain ENS neurons. This close proximity facilitates a dynamic exchange of signals between the microbes and the ENS neurons in the gut.

As research delves deeper into this symbiotic relationship, it has become apparent that our microbiome exerts a profound influence on the communication that flows through the gut-brain axis—so much so that it’s increasingly referred to as the microbiome-gut-brain axis

“Increasing evidence is showing that bacteria in the gut, and the byproducts they produce, affect mood, cognition, and behavior,” states Dr. Spencer.

Serotonin, Dopamine, and other Neurotransmitters

Neurotransmitters are crucial for communication within and between our brain and gut. Interestingly, the microbiome not only responds to neurotransmitters from the brain but also produces these same neurotransmitters that regulate thoughts and emotions, such as serotonin, dopamine, norepinephrine, and GABA.

“Serotonin, widely recognized for its role in mood regulation within the brain, also serves as a key signaling molecule in the gut. Remarkably, microbes in the gut are thought to be responsible for producing 95 percent of our body’s serotonin,” states Dr. Spencer.

Furthermore, the microbiome’s role extends to influencing neurotransmitter production throughout the body. Gut bacteria and our diet combine to provide and synthesize the tryptophan needed for serotonin production. 

“Variations in gut bacteria populations can alter the availability of tryptophan, impacting serotonin synthesis in the brain, which, in turn, influences our mood and behavior,” states Dr. Spencer.

Regulation of Hormones

The gut microbiome plays a pivotal role in regulating hormone secretion by gut cells, notably affecting hormones such as leptin, ghrelin, and insulin. These hormones are essential in communicating with the brain to regulate sensations of hunger and satiety and are also linked to influencing learning, memory, and emotions. Furthermore, the brain contributes to this dialogue by releasing hormones that modulate gut function, establishing a dynamic feedback loop between the brain and the gut.


Postbiotics, the non-live byproducts of microbiota processes, are also integral to brain health. Microbial activity in the gut creates a variety of postbiotics, such as amino acids (the building blocks for neurotransmitters), glucose (which influences the brain’s energy metabolism), and fatty acids (which are crucial for brain development). These postbiotics serve as nutrients for the brain and are delivered from the gut to the brain through the bloodstream.

Recently, short-chain fatty acids (SCFAs), the primary metabolites derived from the microbial breakdown of dietary fiber, have garnered significant research interest for their wide-ranging positive impacts on brain health. SFCAs help strengthen the blood-brain barrier—a critical defense that shields the brain from potentially harmful substances while ensuring the smooth transit of vital nutrients— and exhibit powerful anti-inflammatory properties. These properties allow SCFAs to effectively modulate immune responses within the brain, significantly reducing neuroinflammation. Considering their comprehensive benefits, SCFAs are increasingly recognized as pivotal contributors to the dialogue within the microbiota-gut-brain axis, highlighting their vital role in supporting cognitive health.

Inflammation and Immune System

Gut microbes play a pivotal role in our body’s inflammation and immune responses, which directly impacts the integrity of the gut-brain axis. This communication network between our gut and brain is safeguarded by two critical barriers: the intestinal mucosal barrier and the blood-brain barrier. 

These barriers function as regulatory gatekeepers, managing the flow of information and maintaining the delicate balance within this network. Their permeability, however, is not static and can be influenced by various factors such as stress and inflammation, leading to fluctuations in gut-brain communication that depend heavily on an individual’s physiological state. As such, immune system activity in our gut has indirect, but significant, implications in the brain.

“An unbalanced immune response in the gut can increase the permeability of the intestinal lining—a condition commonly referred to as ‘leaky gut.’ This increased permeability allows substances that should remain within the confines of the digestive tract to enter the bloodstream and even to cross into the brain, potentially causing inflammation and contributing to the onset of various mood related  symptoms and conditions over time,” states Dr. Spencer. “I have seen the clinical implications of this in my patients, as those experiencing gut health issues are more likely to report low energy, brain fog, and anxiety.”

Nurturing the Gut for Better Mood

Research has revealed a complex network of bidirectional interactions linking the nervous system, the gut, and the microbiome. This dynamic interplay grants the microbiome a powerful influence over our psychological state. As a result, the health of our microbial community is recognized as a crucial factor in determining our daily mood and broader mental state. 

Dr. Spencer reinforces this connection by emphasizing the power of dietary choices: “Diet is the most modifiable and accessible way for people to promote a healthier microbiome.”

Diet plays a crucial role in shaping the composition and functionality of our gut microbiota. Consuming healthy foods fosters an environment where “good” microbes thrive, producing byproducts that benefit our mental health. Conversely, indulging in highly processed foods can tilt the balance in favor of “bad” microbes, leading to the production of inflammatory byproducts that negatively impact our mental well-being. As such, studies have focused on identifying dietary changes that can alleviate symptoms of depression, anxiety, and other mental health concerns. 

Observational studies have found that following a healthy, balanced diet, like the Mediterranean diet, as well as steering clear of pro-inflammatory foods and highly processed foods is linked to a reduced risk of depression. Randomized control trials have shed light on the advantages of consuming foods that positively affect microbiome health and composition. Following a “psychobiotic diet,” which focuses on prebiotic- and probiotic-rich foods and limits inflammatory items like sweets, fast food, and sugary drinks, has been linked to reduced perceived stress. Notably, greater adherence to this diet leads to more significant stress reduction. Prebiotic foods in this diet include fruits, vegetables, whole grains, and legumes, all high in soluble fiber, whereas probiotic foods consist of fermented items like kefir and yogurt. 

How Fiber Affects Mood

Another randomized control trial discovered that a high-prebiotic diet improved mood, anxiety, stress, and sleep in adults with moderate psychological distress. This diet involved consuming at least seven daily servings of soluble fiber-rich foods such as asparagus, garlic, onion, oats, whole wheat, and beans.

Interestingly, this study found that probiotic supplements did not yield mental health benefits, suggesting that the consumption of probiotic foods, rather than supplements, might be essential for mental health improvements. These studies highlight the potential of dietary interventions in enhancing mental health through gut-brain communication.

Considering the health of our microbiome requires not only focusing on what foods to incorporate into our diets but also which ones to avoid. Processed foods, a staple in Western diets for their convenience and taste, pose substantial risks to our microbiome’s environment. These items often contain heavily modified ingredients like added sugars, hydrogenated fats, processed meats, and artificial additives to enhance flavor and appearance. Common examples are sugary snacks, fast food such as burgers and fries, instant noodles, sodas, and pre-packaged meals. Consuming these items can disturb the balance of the gut microbiome, provoke inflammation, and adversely affect mental health via the gut-brain axis.

“I advise my patients to prioritize a diet high in whole foods and plants and to steer clear of processed and ultra-processed items, which are high in additives and preservatives that can disrupt the healthy bacteria in the gut,” states Dr. Spencer. “Moreover, I recommend dietary adjustments over the use of supplements like probiotics and prebiotics because food provides a necessary array of nutrients and fiber that currently available supplements cannot yet replicate.”

While the connection between diet and mental health is compelling, it’s important to recognize that food should not be seen as the sole treatment for mood disorders. Especially in cases of severe depression and suicidal thoughts, professional medical advice and treatment are paramount. Diet can play a supportive role in managing mild to moderate forms of depression and anxiety, complementing traditional treatment methods and contributing to overall mental health resilience.

Nurturing the Brain for Better Gut Health

While the microbiome plays a crucial role in shaping our daily mood and overall mental health, conversely, the brian profoundly influences both the composition and functionality of our microbial communities.

Decades of evidence have demonstrated how stress negatively impacts the gut microbiome, both directly affecting the gut microbiota and indirectly altering the gut environment. This is in large part due to the connections between the CNS and ENS, where activation in one system can trigger responses in the other. 

Excessive stress impacts gut transit and motility, leading to reduced nutrient delivery to the microbiome and consequently affecting its growth and diversity. Additionally, stress can impair the secretion of mucus by gut cells, weakening the intestinal mucosal barrier that protects our microbiome. Even short-term stress has the power to significantly alter the microbial community composition, diminishing both its diversity and population.

Improvements at the brain level, such as through cognitive-behavioral therapy (CBT) or meditation, can positively influence gut-microbial composition and function. A study involving participants with Irritable Bowel Syndrome who underwent CBT not only noted changes in brain activity but also observed alterations in the relative abundances of gut microbes. The specific CBT approach taught patients informational processing skills, fostering more flexible thinking about situations and reducing stress.

Similarly, another study explored the potential influence of long-term, regular meditation on the gut microbiota. Participants who practiced meditation exhibited distinct changes in the composition of their gut microbiota compared to a control group, suggesting that mindfulness practices can have a beneficial impact on gut health.

Despite the growing understanding of the gut-brain-microbiome axis, researchers face challenges in studying the relationship between mood and the microbiome due to the myriad of factors involved. The complexity of the microbiome and its sensitivity to a wide range of influences, including diet and stress levels, make it difficult to isolate specific effects on mood. However, the accumulating evidence highlights the promising potential of interventions designed to mitigate stress and enhance mental health. These strategies not only positively influence the gut microbiome but also open novel pathways for addressing gastrointestinal and psychiatric disorders, as well as improving overall mood.

“I’m confident that in the near future we will gain a far more clear understanding of how our diet and microbiome influence our mood,” states Dr. Spencer. “As this field of research expands, we will likely see more ‘psychobiotics’, which are targeted microbial therapeutics to improve our gut-brain connection. Dietary and microbial approaches to improve mental health will undoubtedly be part of our toolkit to promote well being.”