Axial compressors with variable stator vanes require annular gaps and radial gaps from the endwalls for smooth adjustment, which induces complex secondary flows such as the penny leakage vortex and tip leakage vortex, leading to a negative impact on the aerodynamic performance. To better understand these mechanisms, numerical investigations were conducted on four different clearance configurations. The results show that the penny leakage vortex moves toward the suction side under the transverse pressure gradient and mixes with the hub corner stall vortex. This causes the corner separation to be further developed, leading to an increase in total pressure loss by 13.6%. However, the tip clearance leakage flow could reduce the transverse pressure gradient, which prevents penny leakage vortex from mixing with low-energy fluid in the corner region. Moreover, the hub corner stall vortex is also replaced by the tip leakage vortex, which effectively suppresses the range of corner separation. Under the comprehensive effects of the penny leakage vortex and the tip leakage vortex, the total pressure loss coefficient is increased only by 7.6%. Therefore, the mixing effect between the penny leakage vortex and low-energy fluid in the corner separation is the main reason for higher loss production of the cascade, and these findings provide theoretical support for the future application of flow control technology to reduce secondary flow loss.