The atom-bond connectivity (ABC) index of a graph $G$ is the sum of $\sqrt{\frac{d(u)+d(v)-2}{d(u)d(v)}}$ over all edges $uv$ of $G$, where $d(u)$ is the degree of vertex $u$ in $G$. We characterize the extremal trees with fixed degree sequence that maximize and minimize the ABC index, respectively. We also provide algorithms to construct such trees.