Perinatal maternal high-fat (HF) diet programmes offspring obesity. Obesity is associated with overactivation of the endocannabinoid system (ECS) in adult subjects, but the role of the ECS in the developmental origins of obesity is mostly unknown. The ECS consists of endocannabinoids, cannabinoid receptors (cannabinoid type-1 receptor (CB1) and cannabinoid type-2 receptor (CB2)) and metabolising enzymes. We hypothesised that perinatal maternal HF diet would alter the ECS in a sex-dependent manner in white and brown adipose tissue of rat offspring at weaning in parallel to obesity development. Female rats received standard diet (9 % energy content from fat) or HF diet (29 % energy content from fat) before mating, during pregnancy and lactation. At weaning, male and female offspring were killed for tissue harvest. Maternal HF diet induced early obesity, white adipocyte hypertrophy and increased lipid accumulation in brown adipose tissue associated with sex-specific changes of the ECS’s components in weanling rats. In male pups, maternal HF diet decreased CB1 and CB2 protein in subcutaneous adipose tissue. In female pups, maternal HF diet increased visceral and decreased subcutaneous CB1. In brown adipose tissue, maternal HF diet increased CB1 regardless of pup sex. In addition, maternal HF diet differentially changed oestrogen receptor across the adipose depots in male and female pups. The ECS and oestrogen signalling play an important role in lipogenesis, adipogenesis and thermogenesis, and we observed early changes in their targets in adipose depots of the offspring. The present findings provide insights into the involvement of the ECS in the developmental origins of metabolic disease induced by inadequate maternal nutrition in early life.