This study develops a feedforward control strategy based on the motion state of center-of-mass (CoM) of a robot for underactuated biped robot stable walking on compliant continuous steps with a known varying height. First, considering ground deformation, a compliant contact model is employed to characterize foot-ground interaction, and a robot–step coupling dynamic model of sagittal and lateral planes are established through decoupling modelling. Second, based on the gait characteristics of human variable-step walking, a feedforward control strategy based on the motion state of CoM is proposed. Varying height step is equivalent to varying slope, an equivalent slope angle and a desired step length can be calculated for each step according to their height. Underactuated bipedal walking control is decoupled into sagittal and lateral master-slave control. The velocity of robot CoM is considered as a system output. It is controlled through the displacement of CoM in a single walking cycle, and thus walking is stabilized. By the proposed method, the walking system is modelled as a polynomial with definite number of degrees and the controlled input is derived through a simple inverse operation on it. Its effectiveness is validated through simulations in an environment with a step varying height of less than 0.032 m. Simulation results show that the proposed method can improve the tracking performance of robot CoM velocity on varying height steps, as compared to a hybrid zero dynamic (HZD)-based controller.