A model following adaptive sliding mode tracking control (MFASMTC) with the adjustable control gain based on a disturbance observer (DOB) for the mechanical system is proposed in this paper. The control gains of the proposed controller are automatically adjusted to compensate the unknown time-varying disturbances by the DOB. First, the unknown variables and uncertainties are lumped as the disturbance terms and the system dynamic model consist of the nominal matrix and disturbances vector. The desired model and sliding mode controller (SMC) are integrated by using the Lyapunov function candidate to obtain the general model following sliding mode tracking control (MFSMTC) with the fixed control gain. To stabilize and compensate the unknown time-varying disturbances for the control system, a DOB is combined with the MFSMTC to obtain the MFASMTC to automatically adjust the control gains. The mass-spring-damper system and two-link manipulator robot system are both used as examples system to demonstrate the proposed control scheme, respectively. The comparisons between MFSMTC with the fixed control gain and MFASMTC with the adjustable control gain based on a DOB are performed in this paper. From the simulation results, the proposed MFASMTC with the adjustable control gain based on a DOB demonstrates the stable and robust control performance for the unknown uncertainties and external disturbances. The proposed control method also can be applied to the other mechanical systems with the desired model to find the desired model following adaptive sliding mode tracking control.