A sliding mode control (SMC) strategy is proposed in this paper for a class of perturbed nonlinear systems with unmeasurable states and state constraints to deal with the state tracking problems. First of all, a partial states observer is designed for solving the problems due to unmeasurable states. The estimation errors will approach zero in a finite time. Secondly, based on a designed barrier Lyapunov function, one designs the sliding surface function and an adaptive sliding mode tracking controller to ensure that the states have the ability to track the desired signals. Moreover, the tracking error is capable of converging to zero in a finite time without violating the given state's constraints. Perturbation estimator and adaptive mechanisms are also utilized so that there is no need to know the upper bounds of perturbations and perturbation estimation errors. Finally, a numerical example is provided to demonstrate the feasibility of the proposed control strategy.