Simplified dynamics models have been widely adopted to reduce the computational complexity of motion planning for legged robots. However, not much research has been conducted on the collision avoidance for a simplified dynamics model. To contribute to this problem, we present the collision-backpropagation based obstacle avoidance method (CBOA), in which we employ the gradient flow of the collision cost to optimize the trajectory, thus avoiding collisions with obstacles. Our experiment shows that the CBOA reduces the collision rate of planned trajectories by up to 15.89 times compared to a previous implicit collision avoidance method.