Importance Psilocybin therapy shows antidepressant potential; our data link its antidepressant effects to decreased brain network modularity post-treatment. Objective To assess the sub-acute impact of psilocybin on brain activity in patients with depression. Design Pre vs post-treatment resting-state functional MRI (fMRI) was recorded in two trials: 1) Open-label treatment-resistant depression (TRD) trial with baseline vs 1 day post-treatment fMRI (April-2015 to April-2016); 2) Two-arm double-blind RCT in major depressive disorder (MDD), fMRI baseline vs 3 week after psilocybin-therapy or 6 weeks of daily escitalopram (January-2019 to March-2020). Setting Study visits occurred at the NIHR Imperial Clinical Research Facility.Participants Adult male and female patients with TRD or MDD. Intervention(s) (for clinical trials) or Exposure(s) (for observational studies)Study 1: Two oral doses of psilocybin (10mg and 25mg, fixed order, 7 days apart). fMRI was recorded at baseline and one day after the 25mg dose. Study 2: either: 2 x 25mg oral psilocybin, 3 weeks apart, plus 6 weeks of daily placebo (‘psilocybin-arm’), or 2 x 1mg oral psilocybin, 3 weeks apart, plus 6 weeks of daily escitalopram [10-20mg] (‘escitalopram-arm’). fMRI was recorded at baseline and 3 weeks after the 2nd psilocybin dose, which was the final day of the 6-week daily capsule ingestion. Main Outcome(s) and Measure(s) Beck Depression Inventory and fMRI network modularity. Results Study 1: In 16 adults (mean age [SD], 42.8 [10.1] years, 4 [25%] female), psilocybin therapy was associated with markedly decreased BDI scores at 1 week (mean difference, -21; 95% CI=[-27.3, -14.7], P<.001) and 6 months (mean difference, -14.19; 95% CI=[-21.3, -7.1], P<.001). Decreased network modularity at one day post-treatment correlated with treatment response at 6 months (Pearson, 0.64; P=.01). Study 2: In 43 adults (42.7 [10.5] years, 14 [33%] female), antidepressant effects favoured the psilocybin-arm at 2 (mean difference, -8.76; 95% CI=[-13.6, -3.9], P=.002) and 6 weeks (mean difference, -8.78; 95% CI=[-15.6, -2.0], P=.01). Specific to the psilocybin-arm, improvements at the 6-week primary endpoint correlated with decreased network modularity (Pearson, -0.42, P=.025). Conclusions and Relevance Consistent efficacy-related functional brain changes correlating with robust and reliable antidepressant effects across two studies suggest a candidate antidepressant mechanism for psilocybin therapy: decreased brain network modularity. Trial registration ClinicalTrials.gov identifier: NCT03429075