Constipation and depression are tightly related and often co-occur and coexist in clinic. Yet, the relationships and the underlying mechanisms are still unclear. Fecal metabolomics and network pharmacology were, for the first time, applied to investigate the potential correlations from multiple levels including classic behaviors, metabolomics, and gene targets. The behavioral indicators were analyzed, providing behavioral correlations at a macrolevel. Besides, fecal samples were analyzed by nuclear magnetic resonance spectroscopy to screen the shared and the unique metabolites and pathways, revealing correlations from a metabolic perspective. Finally, the disease targets and the functional pathways were obtained via network pharmacology, demonstrating correlations at the molecular level. The correlations between constipation and depression were demonstrated and supported by four-level evidence: (1) general behaviors, (2) gastrointestinal functions, (3) fecal metabolites and pathways, and (4) common gene targets and functional pathways. Especially, the correlations of behaviors and common metabolites showed that metabolites, including choline, betaine, and glycine, were significantly associated with constipation and depression. Besides, inflammation and immune abnormalities and energy metabolism were significantly involved in the mechanisms. The current findings prove the correlations between constipation and depression, and provide a basis for deeply understanding the comorbidities of constipation and depression.