A detailed understanding of the molecular mechanisms of plant stress resistance in the face of ever-changing environmental stimuli will be helpful for promoting the growth and production of crop and forage plants. Investigations of plant responses to various single abiotic or biotic factors, or combined stresses, have been extensively reported. However, the molecular mechanisms of plants in responses to environmental stresses under natural conditions are not clearly understood. In this study, we carried out a transcriptome analysis using RNA-sequencing to decipher the underlying molecular mechanisms of Onobrychis viciifolia responding and adapting to the extreme natural environment in the Qinghai-Tibetan Plateau (QTP). The transcriptome data of plant samples collected from two different altitudes revealed a total of 8212 differentially expressed genes (DEGs), including 5387 up-regulated and 2825 down-regulated genes. Detailed analysis of the identified DEGs uncovered that up-regulation of genes potentially leading to changes in hormone homeostasis and signaling, particularly abscisic acid-related ones, and enhanced biosynthesis of polyphenols play vital roles in the adaptive processes of O. viciifolia. Interestingly, several DEGs encoding uridine diphosphate glycosyltransferases, which putatively regulate phytohormone homeostasis to resist environmental stresses, were also discovered. Furthermore, numerous DEGs encoding transcriptional factors, such as members of the myeloblastosis (MYB), homeodomain-leucine zipper (HD-ZIP), WRKY, and nam-ataf1,2-cuc2 (NAC) families, might be involved in the adaptive responses of O. viciifolia to the extreme natural environmental conditions. The DEGs identified in this study represent candidate targets for improving environmental stress resistance of O. viciifolia grown in higher altitudes of the QTP, and can provide deep insights into the molecular mechanisms underlying the responses of this plant species to the extreme natural environmental conditions of the QTP.