In this work, we present the design, implementation, and testing of a guidance system for the UX-1 robot, a novel spherical underwater vehicle designed to explore and map flooded underground mines. For this purpose, it needs to navigate completely autonomously, as no communications are possible, in the 3D networks of tunnels of semistructured but unknown environments and gather various geoscientific data. First, the overall design concepts of the robot are presented. Then, the guidance system and its subsystems are explained. Finally, the system’s validation and integration with the rest of the UX-1 robot systems are presented. A series of experimental tests following the software-in-the-loop and the hardware-in-the-loop paradigms have been carried out, designed to simulate as closely as possible navigation in mine tunnel environments. The results obtained in these tests demonstrate the effectiveness of the guidance system and its proper integration with the rest of the systems of the robot, and validate the abilities of the UX-1 platform to perform complex missions in flooded mine environments.