This paper aims to add the autonomous driving capability to the inverted pendulum system which maintains the inverted pendulum upright stably. For the autonomous driving from the starting position to the goal position, the motion control algorithm is proposed based on the dynamics of the inverted pendulum robot. To derive the dynamic model of the inverted pendulum robot, a three dimensional robot coordinate is defined and the velocity jacobian is newly derived. With the analysis of the wheel rolling motion, the dynamics of inverted pendulum robot are derived and used for the motion control algorithm. To maintain the balance of the inverted pendulum, the autonomous driving strategy is derived step by step considering the acceleration, constant velocity and deceleration states simultaneously. The driving experiments of inverted pendulum robot are performed while maintaining the balance of the inverted pendulum. For reading the positions of the inverted pendulum and wheels, only the encoders are utilized to make the system cheap and reliable. Even though the derived dynamics works for the slanted surface, the experiments are carried out in the standardized flat ground using the inverted pendulum robot in this paper. The experimental data for the wheel rolling and inverted pendulum motions are demonstrated for the straight line motion from a start position to the goal position.