A lower concentration of cadmium (Cd), a hazardous and non-essential element for plant growth, will have deleterious effects on plants and endanger human health. Histone demethylase (JHDM) is important for plants' ability to withstand abiotic stress, according to an increasing number of studies. The degree of expression of the SlJMJ18 and SlJMJ23 genes in different tomato tissues was confirmed by this study. These two genes were responsive to the heavy metals Cd, Hg, Pb, and Cu stress, according to fluorescence quantification and GUS staining. Interestingly, the overexpression transgenic Arabidopsis plants of two genes have different responses to Cd stress. While SlJMJ18-OE lines consistently display Cd resistance but an early-flowering phenotype, SlJMJ23-OE plants have sensitivity during the post-germination stage and then greater tolerance to Cd stress. It was discovered that these two genes may affect cadmium tolerance of plants by regulating the expression of hormone synthesis related genes and hormone contents (BRs and ABA). Moreover, SlJMJ23 may resist cadmium stress by increasing the total phenol content in plants. The functional significance of JMJs is better understood in this study, which also offers a theoretical foundation for the use of molecular technology to develop plants resistant to Cd and an experimental basis for the efficient use of land resources.