Dendrobium officinale is an important traditional Chinese medicinal plant and crop, which contains many kinds of medicinal components. The quality of medicinal plants is closely related to the ecological factors in a growing environment. The main components of D. officinale determined in this study were polysaccharides, total alkaloids and total flavonoids. In addition, this study dealt with the correlation of these components to 16 ecological factors under three different cultivation modes (Greenhouse, Bionic, Wild; Lu’an, Anhui Province, China). The relationship between ecological factors and quality factors was analyzed step by step using correlation analysis, principal component analysis and stepwise multiple linear regression. Eight ecological factors: maximum relative humidity, minimum relative humidity, maximum temperature, sunshine duration, soil pH, soil total nitrogen, soil total phosphorus and soil available phosphorus were considered as key factors that influenced the main medicinal qualities of cultivated D. officinale. This study provides an insight for exploring the complex relationship between ecological factors and D. officinale medicinal value in artificial cultivation.