The matching energy is defined as the sum of the absolute values of the zeros of the matching polynomial of a graph, which is proposed first by Gutman and Wagner [The matching energy of a graph, Discrete Appl. Math. 160 (2012) 2177-2187]. And they gave some properties and asymptotic results of the matching energy. In this paper, we characterize the trees with n vertices whose complements have the maximal, second-maximal and minimal matching energy.Further, we determine the trees with a perfect matching whose complements have the secondmaximal matching energy. In particular, show that the trees with edge-independence number number p whose complements have the minimum matching energy for p = 1, 2, . . . , ⌊ n 2 ⌋.