Unsteady blade row interactions play an important role in the performance of multistage turbomachinery. However, most aerodynamic optimizations of multistage turbomachinery are based on mixing-plane steady flow simulations. To take into account the unsteady flow features in the optimization cycle, this paper develops an adjoint-based unsteady aerodynamic optimization system for multistage turbomachinery. To the authors' best knowledge, this is the first work in the literature conducting the unsteady adjoint aerodynamic optimization of multistage turbomachinery. The unsteady flow equations and the discrete adjoint equations are solved using a finite volume code, with the harmonic balance method adopted to reduce the cost of unsteady simulations. The system is applied to the unsteady aerodynamic optimization of a 1.5-stage compressor. Results show the efficiency and capability of the proposed framework for the unsteady aerodynamic optimization of multistage turbomachinery.