In this study, based on the OneKP database and through comparative genetic analysis, we found that HMT and HDM may originate from Chromista and are highly conserved in green plants, and that during the evolution from algae to land plants, histone methylation modifications gradually became complex and diverse, which is more conducive to the adaptation of plants to complex and variable environments. We also characterized the number of members, genetic similarity, and phylogeny of HMT and HDM families in barley using the barley pangenome and the Tibetan Lasa Goumang genome. The results showed that HMT and HDM were highly conserved in the domestication of barley, but there were some differences in the Lasa Goumang SDG subfamily. Expression analysis showed thatHvHMTsandHvHDMswere highly expressed in specific tissues and had complex expression patterns under multiple stress treatments. In summary, the amplification and variation of HMT and HDM facilitate plant adaptation to complex terrestrial environments, while they are highly conserved in barley and play an important role in barley growth and development with abiotic stresses. In brief, our findings provide a novel perspective on the origin and evolutionary history of plantHvHMTsandHvHDMs, and lay a foundation for further investigation of their functions in barley.