Graphical abstract Highlights • Dencichine is significantly correlated with the selenium content in P. notoginseng. • There is a significant correlation between dencichine and selenium content in soil. • Selenium promotes the accumulation of dencichine in P. notoginseng. • Dencichine increases the antioxidant capacity of P. notoginseng. • Dencichine improves the stress resistance of P. notoginseng. Abstract Dencichine is the main ingredient in Panax notoginseng, which is an herb that plays a key role in hemostasis. The biosynthesis of dencichine requires the participation of sulfur. Selenium and sulfur are congeners. The purpose of this study was to reveal if selenium participates in the synthesis of dencichine, and to determine whether dencichine plays a role in anti-stress effects. P. notoginseng and planting soil were sampled from different sites and subjected to selenium and dencichine determinations. Biosynthesis of dencichine was investigated by exposing the seedlings to different selenium concentrations in pot and hydroponic experiments. The effects of dencichine on the regulation of the antioxidant enzyme system and reactive oxygen species (ROS) were also tested in hydroponic experiments. The results indicated that the selenium and dencichine contents of roots were 0.69-0.98% and 0.21–1.18 mg kg−1, respectively, and the soil selenium content in 18 planting areas in Yunnan Province was 0.16-0.32 mg kg−1. Dencichine and selenium contents in soil or plants were positively correlated (R2 = 0.1643***, R2 = 0.3084***, respectively). Selenium treatment increased the dencichine content by 69–111% in pot experiments using 5 mg kg−1 and by 23–33% in hydroponic experiments using 2 μM. The key genes in the dencichine biosynthetic pathway, such as β-cyanoalanine synthase and serine acetyltransferase , were significantly upregulated by the 2 μM selenium treatment. Dencichine treatment (30 μM) significantly enhanced root activity, increased antioxidant capacity, decreased ROS content, and reduced lipid peroxidation of the cell membranes. Therefore, selenium promoted the synthesis of dencichine, which acted as an anti-stress agent in P. notoginseng. However, the selenium content was deficient in the P. notoginseng planting soil from Yunnan Province. These results suggest that appropriate selenium supplementation is beneficial for the growth and development of P. notoginseng and the accumulation of dencichine. [ABSTRACT FROM AUTHOR]