Aiming to the mutation of the actual output boundary, a prescribed finite-time safe tracking control problem is investigated for a class of nonlinear systems with unknown control gain in this paper. A secure boundary protection method (SBPM) and a new prescribed finite-time performance function (PFTPF) are proposed. The SBPM can construct automatically two adjustable secure boundaries, so that the system meets both the control performance prescribed by the PFTPF and the constraint of the secure boundaries. In order to solve the problem of the excessive jitter of control input caused by the mutation of the output constraint, a bidirectional filtering smoothing mechanism (BFSM) is proposed. The proposed method can effectively deal with the mutation of actual output constraint, and it is not necessary to predict the system output value to adjust the desired output trajectory. Finally, the effectiveness of this proposed method is verified by simulations.