In this work, we present a second-order nonuniform time-stepping scheme for the time-fractional Allen-Cahn equation. We show that the proposed scheme preserves the discrete maximum principle, and by using the convolution structure of consistency error, we present sharp maximum-norm error estimates which reflect the temporal regularity. As our analysis is built on nonuniform time steps, we may resolve the intrinsic initial singularity by using the graded meshes. Moreover, we propose an adaptive time-stepping strategy for large time simulations. Numerical experiments are presented to show the effectiveness of the proposed scheme. This seems to be the first second-order maximum principle preserving scheme for the time-fractional Allen-Cahn equation.