Terpenoids are essential for plants to adapt for specific ecological niches which are also extensively used in industries of flavor, fragrance, spice, and medicine. Dendrobium catenatum, belonging to epiphytic orchids, is a traditional medicinal plant of high economic value due to its natural abundance in secondary metabolites beneficial for humans. However, knowledge is lacking about the genetic structure of terpenoids and terpenes-mediated stress response in D. catenatum. In this study, terpene synthase DcTPS was mined as an evolutionary gene using phylogenomics in D. catenatum and relative species, and the function of this gene was characterized by transient overexpression in tobacco leaves. Subsequently, co-expression network analysis and machine learning were used to identify transcription factors closely related to DcTPS. Expression changes of DcTPS in response to environmental stresses were also conducted. All these results provided new insights into DcTPS-mediated molecular mechanism of terpenoid accumulation and environmental adaptation in D. catenatum, which will be valuable to guide the cultivation of high-quality medicinal plants and development of terpenoids-related industrial products.