Insufficient sleep can produce a multitude of deleterious repercussions on various domains of human well-being. Concomitantly, the walnut (
Juglans mandshurica
) confers numerous salutary biological activities pertaining to sleep. Nevertheless, the sedative and hypnotic capacities of walnut’s functional constituents remain obscure. In this investigation, we analyzed the sedative and hypnotic components of the walnut
Diaphragma juglandis fructus
and innovatively discovered a compound, defined as 3-hydroxy-4-iminobutyric acid (HIBA), which disrupts motor activity and enhances sleep duration by regulating the neurotransmitters (GABA, DA, etc.) within the brain and serum of mice. Subsequently, a metabolomics approach of the serum, basal ganglia, hypothalamus, and hippocampus as well as the gut microbiota was undertaken to unravel the underlying molecular mechanisms of sleep promotion. Our data reveal that HIBA can regulate the metabolism of basal ganglia (sphingolipids, acylcarnitines, etc.), possibly in relation to HIBA’s influence on the gut microbiome (
Muribaculum
,
Bacteroides
,
Lactobacillus
, etc.). Therefore, we introduce a novel natural product, HIBA, and explicate the modulation of sleep promotion in mice based on the microbiota–gut–brain axis. This study contributes fresh insights toward natural product-based sleep research.