Gutman and Wagner proposed the concept of the matching energy which is defined as the sum of the absolute values of the zeros of the matching polynomial of a graph. And they pointed out that the chemical applications of matching energy go back to the 1970s. Let T be a tree with n vertices. In this paper, we characterize the trees whose complements have the maximal, second-maximal and minimal matching energy. Furthermore, we determine the trees with edge-independence number p whose complements have the minimum matching energy for p = 1, 2, . . . , [n/2]. When we restrict our consideration to all trees with a perfect matching, we determine the trees whose complements have the second-maximal matching energy.