BackgroundCannabis consumption by pregnant women continues to increase worldwide, raising concerns about adverse effects on fetal growth and deleterious impacts on the newborn, in connection with evidence of placental transfer of cannabis compound. Cannabis action is mediated by the endocannabinoid system (ECS), which expression is well established in the brain but unknown in the developing testis. The fetal testis, whose endocrine function orchestrates the masculinization of many distant organs, is particularly sensitive to disruption by xenobiotics. In this context, we aimed to determine whether cannabis exposure has the potential to directly impact the human fetal testis.MethodsWe determined the expression of components of the ECS in the human fetal testis from 6 to 17 developmental weeks and assessed the direct effects of phytocannabinoids Δ9-trans-tetrahydrocannabinol (THC) and cannabidiol (CBD) on the testis morphology and cell functions ex vivo.ResultsWe demonstrate the presence in the human fetal testis of two key endocannabinoids, 2-arachidonylglycerol (2-AG) and to a lower level anandamide (AEA), as well as a range of enzymes and receptors for the ECS. Ex vivo exposure of first trimester testes to CBD, THC, or CBD/THC [ratio 1:1] at 10−7to 10−5M altered testosterone secretion by Leydig cells, AMH secretion by Sertoli cells, and impacted testicular cell proliferation and viability as early as 72 h post-exposure. Transcriptomic analysis on 72 h-exposed fetal testis explants revealed 187 differentially expressed genes (DEGs), including genes involved in steroid synthesis and toxic substance response. Depending on the molecules and testis age, highly deleterious effects of phytocannabinoid exposure were observed on testis tissue after 14 days, including Sertoli and germ cell death.ConclusionsOur study is the first to evidence the presence of the ECS in the human fetal testis and to highlight the potential adverse effect of cannabis consumption by pregnant women onto the development of the male gonad.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12916-023-02916-5.