Higher diet quality, especially with more pulses and vegetables, was linked to greater Lachnospira abundance in the gut and lower stress scores among Japanese adults. The relationship appears to be mediated by specific gut bacteria rather than a direct effect of diet on stress.