For a given graph G, the Mostar index Mo(G) is the sum of absolute values of the differences between nu(e) and nv(e) over all edges e = uv of G, where nu(e) and nv(e) are, respectively, the number of vertices of G lying closer to u than to v and the number of vertices of G lying closer to v than to u. A chemical tree is a tree with the maximum degree at most 4. In this paper, the chemical trees of order n with the greatest Mostar index are determined. And the chemical trees of order n and diameter d with the greatest Mostar index are also deter...