Psilocybin is a serotonergic psychedelic with therapeutic potential for treating mental illnesses 1-4 . At the cellular level, psychedelics induce structural neural plasticity 5,6 , exemplified by the drug-evoked growth and remodeling of dendritic spines in cortical pyramidal cells 7-9 . A key question is how these cellular modifications map onto cell type-specific circuits to produce psychedelics' behavioral actions 10 . Here, we use in vivo optical imaging, chemogenetic perturbation, and cell type-specific electrophysiology to investigate the impact of psilocybin on the two main types of pyramidal cells in the mouse medial frontal cortex. We find that a single dose of psilocybin increased the density of dendritic spines in both the subcortical-projecting, pyramidal tract (PT) and intratelencephalic (IT) cell types. Behaviorally, silencing the PT neurons eliminates psilocybin's ability to ameliorate stress-related phenotypes, whereas silencing IT neurons has no detectable effect. In PT neurons only, psilocybin boosts synaptic calcium transients and elevates firing rates acutely after administration. Targeted knockout of 5-HT 2A receptors abolishes psilocybin's effects on stress-related behavior and structural plasticity. Collectively these results identify a pyramidal cell type and the 5-HT 2A receptor in the medial frontal cortex as playing essential roles for psilocybin's long-term drug action.