Abstract The paper develops a unified feedback control law for n degree-of-freedom biped robots with one degree of underactuation so as to generate periodic orbits on different slopes. The periodic orbits on different slopes are produced from an original periodic orbit, which is either a natural passive limit cycle on a specific slope or a stable periodic walking gait on level ground generated with active control. First, inspired by the controlled symmetries approach, a general result on gait generation on different slopes based on a periodic orbit on a specific slope is obtained. Second, the time-scaling control approach is integrated to reproduce geometrically same periodic orbits for biped robots with one degree of underactuation. The degree of underactuation is compensated by one degree-of-freedom in the temporal evolution that scales the original periodic orbit. Necessary and sufficient conditions are investigated for the existence and stability properties of periodic orbits on different slopes with the proposed control law. Finally, the proposed approach is illustrated by two kinds of underactuated biped robots: one has a passive gait on a specific ground slope and the other does not have a natural passive gait.