This research focuses on stabilizing a six-legged robot on tilted surfaces using a nine degree of freedom (dof) inertial measurement unit (IMU) and inverse kinematics. The IMU data, processed by a fuzzy-PID controller, allows the robot to maintain balance while moving on uneven terrain, achieving minimal root mean square error in pitch, roll, and yaw. Results indicate successful robot movements based on adjusted x, y, and z axes translation, highlighting the effectiveness of the proposed stabilization method.