For the use of a mobile robot in complex environment, a collision-avoidance algorithm with a moving obstacle is necessary. In this paper, a collision-avoidance algorithm of a mobile robot is presented, when a mobile robot detects the collision with a moving obstacle on the navigational path. Using reported positions of a moving obstacle with sensors, the mobile robot predicts the next position of moving obstacle with possibility of collision. The velocity of a moving obstacle is modeled as random walk process with gaussian distribution. The optimal collision-avoidance path in which turning motion of the mobile robot is considered is generated with relative velocity between the mobile robot and a moving obstacle. For the safety of collision-avoidance path, attractive potential with the safety factor is suggested. The simulation results using this algorithm show the mobile robot avoids collision with a moving obstacle in many cases.