When multi-legged robots work in dangerous and complex environments, their legs are easily damaged, resulting in a sharp decline in their movement ability, or even completely out of control. In this paper, the gait generation method combined deep reinforcement learning with bionic gait restrictions is presented for multi-legged robots with injured legs. In this study, we first built an ant gait video acquisition platform using the Camponotus Japonicus as the research object, and on this basis established a gait dataset of injured ants. Then, the gait characteristics of ants in the injured state were investigated. Finally, our proposed gait generation method combining bionic gait constraints with deep reinforcement learning was compared with the reinforcement-learning-based method in the MATLAB simulation environment. The test results show that the training reward values of our proposed algorithm are 1–2 times higher than those of the reinforcement learning method alone, and at the same time, the moving speed of the injured robot is also nearly twice as fast.