The Hosoya index and the Merrifield-Simmons index are two important molecular descriptors in chemical graph theory. The Hosoya index is defined as the total number of matchings of the graph and the Merrifield-Simmons index is defined as the total number of independent sets of the graph. In this paper, the author obtains the extremal values of the Hosoya index and the Merrifield-Simmons index of trees with given domination number.