The paper concentrates on the problem of second-order sliding mode (SOSM) controller design with mismatched term and time-varying Output Constraint. By designing a novel time-varying Barrier Lyapunov Function (BLF) and using the modified adding a power integrator (API) technique, a SOSM control algorithm, which is able to cope with the closed-loop system simultaneously with and without time-varying output constraint, has been developed. The rigorous mathematical proof shows that with the time-varying output constraint, the presented control strategy ensures the finite-time stability of the considered system. Lastly, the effectiveness of the presented algorithm is demonstrated by an illustrative example.