Rhizopus oryzae is a fungus used to ferment tempeh in Indonesia and is generally recognized as safe (GRAS) for human consumption by the USA FDA. We previously assessed the effect of a tempeh extract on cortisol levels in zebrafish but did not include behavioral studies. Here, we measured the GABA content in three strains of Rhizopus oryzae, two isolated by us (MHU 001 and MHU 002) and one purchased. We then investigated the effect of tempeh on cortisol and the gut microbiota in a zebrafish experimental model. GABA concentration was the highest in MHU 002 (9.712 ± 0.404 g kg-1) followed by our MHU 001 strain and the purchased one. The fish were divided into one control group fed a normal diet and three experimental groups fed soybean tempeh fermented with one of the three strains of Rhizopus oryzae. After two weeks, individual fish were subjected to unpredicted chronic stress using the novel tank diving test and the tank light-dark test. Next-generation sequencing was used to analyze gut microbial communities and RT-PCR to analyze the expression of BDNF (brain-derived neurotrophic factor) gene and of other genes involved in serotonin signaling/metabolism in gut and brain. Tempeh-fed zebrafish exhibited increased exploratory behavior (less stress) in both tank tests. They also had significantly reduced gut Proteobacteria (include E. coli) (51.90% vs. 84.97%) and significantly increased gut Actinobacteria (include Bifidobacterium spp.) (1.80% vs. 0.79%). The content of Bifidobacteriumadolescentis, a "psychobiotic", increased ten-fold from 0.04% to 0.45%. Tempeh also increases BDNF levels in zebrafish brain. Rhizopus oryzae MHU 001 greatly improved the anti-stress effect of tempeh and microbiota composition in zebrafish gut.