This study aimed to develop a relatively natural and safe botanical insecticide for controlling the storage pest Tribolium castaneum in the egg and pupal stages. It examined how Elsholtzia densa Benth. essential oil (EO) and its primary components, β-caryophyllene and limonene, affected T. castaneum eggs and pupae through contact and fumigation. Among th, the contact activities of β-caryophyllene against T. castaneum eggs and pupae are LD50 (median lethal dose, 50%) = 0.156 mg/cm2 and ED50 (median effective dose, 50%) = 16.35 mg/pupa respectively. The study also investigated the effect of β-caryophyllene and limonene on T. castaneum eggs and pupae through synergistic contact and fumigation. When the mixing ratio of β-caryophyllene and limonene was 7:1, the LD50 value of contact activity against T. castaneum eggs was reduced to 0.100 mg/cm2, displaying an obvious synergistic effect. Experiments were conducted to investigate the antitoxic effect of β-caryophyllene on T. castaneum eggs and pupae, as well as its effects on the enzymatic activity of acetylcholinesterase, succinate dehydrogenase, glutathione S-transferase and carboxylesterase in T. castaneum pupae. Finally, the molecular docking techniques were employed to confirm the aforementioned effects on enzyme function. The findings of this study might help improve storage pest control with T. castaneum and create eco-friendly insecticides using E. densa EO, β-caryophyllene, and limonene.