A robot controller and a robot control method, capable of preventing an operator from being sandwiched between a robot and a workpiece, when a conveyor for conveying the workpiece is stopped. The robot controller is configured to output a robot stop command when a conveyor starts the stop operation thereof. The robot stop command includes at least one of: a first stop command by which, when a movable section of the robot is positioned anterior to the workpiece, the movable section is moved at a higher velocity than the conveyor, and then is stopped after traveling a distance longer than a coasting distance of the conveyor; and a second stop command by which, when the movable section is positioned posterior to the workpiece, the movable section is moved at a lower velocity than the conveyor, and then is stopped after traveling a distance shorter than the coasting distance.