Evidence from preclinical animal models suggests that the stress-buffering function of the endocannabinoid (eCB) system may help protect against stress-related reductions in hippocampal volume, as is documented in major depressive disorder (MDD). However, stress exposure may also lead to dysregulation of this system. Thus, pathways from marked stress histories, such as childhood maltreatment (CM), to smaller hippocampal volumes and MDD in humans may depend on dysregulated versus intact eCB functioning. We examined whether the relation between MDD and peripheral eCB concentrations would vary as a function of CM history. Further, we examined whether eCBs moderate the relation of CM/MDD and hippocampal volume. Ninety-one adults with MDD and 62 healthy comparison participants (HCs) were recruited for a study from the Canadian Biomarker Integration Network in Depression program (CAN-BIND-04). The eCBs, anandamide (AEA) and 2-arachidonylglycerol (2-AG), were assessed from blood plasma. Severe CM history was assessed retrospectively via contextual interview. MDD was associated with eCBs, though not all associations were moderated by CM or in the direction expected. Specifically, MDD was associated with higher AEA compared to HCs regardless of CM history, a difference that could be attributed to psychotropic medications. MDD was also associated with higher 2-AG, but only for participants with CM. Consistent with hypotheses, we found lower left hippocampal volume in participants with versus without CM, but only for those with lower AEA, and not moderate or high AEA. Our study presents the first evidence in humans implicating eCBs in stress-related mechanisms involving reduced hippocampal volume in MDD.