Wall-climbing robots have been well-developed for storage tank inspection. This work presents a backstepping sliding-mode control (BSMC) strategy for the spatial trajectory tracking control of a wall-climbing robot, which is specially designed to inspect inside and outside of cylindrical storage tanks. The inspection robot is designed with four magnetic wheels, which are driven by two DC motors. In order to achieve an accurate spatial position of the robot, a multisensor-data-fusion positioning method is developed. The new control method is proposed with kinematics based on a cylindrical coordinate system as the robot is moving on a cylindrical surface. The main purpose is to promote a smooth and stable tracking performance during inspection tasks, under the consideration of the robot's kinematic constraints and the magnetic restrictions of the adhesion system. The simulation results indicate that the proposed sliding mode controller can quickly correct the errors and global asymptotic stability is achieved. The prototype experimental results further validate the advancement of the proposed method; the wall-climbing robot can track both longitudinal and horizontal spatial trajectories stably with high precision.