Domain adaptation enables accurate predictions despite differing distributions between the source and target domains by learning domaininvariant representations. In some applications when there are confounding factors, some domain-invariant features correlated with the samples in the source domain may not be inherently relevant to the target domain. Causal inference uncovers causal relationships, allowing us to reveal the underlying patterns and mechanisms behind the data. However, most existing causal inference algorithms have limitations when applied to high-dimensional datasets with nonlinear causal relationships. In this work, a new causal representation method based on a Graph autoencoder embedded AutoEncoder, named GeAE, is introduced to learn invariant representations across domains. The proposed approach employs a causal structure learning module, similar to a graph autoencoder, to account for nonlinear causal relationships present in the data. Moreover, the cross-entropy loss as well as the causal structure learning loss and the reconstruction loss are incorporated in the objective function designed in a united autoencoder. In this way, it is capable of handling highdimensional data and enhancing the accuracy of crossdomain predictions through the use of causal representations. Experimental results on generated datasets and three real-world datasets demonstrate the effectiveness of GeAE in comparison with the state-of-theart methods.