We investigated the obstacle avoidance in locomotion of the rat using a neuromusculoskeletal model. We constructed a musculoskeletal model of the hindlimbs based on the measured anatomical data and constructed a nervous system model based on the central pattern generator and muscle synergy. We incorporated sensory regulation models based on interlimb coordination and phase resetting and investigated their functional roles during obstacle avoidance in locomotion. Our simulation results show that the phase regulation based on interlimb coordination contributes to stepping over a high obstacle and show that the phase regulation based on phase resetting contributes to quick recovery after obstacle avoidance. These results suggest the importance of sensory regulation in generation of successful obstacle avoidance in locomotion.