Recently, underwater robotics has rapidly developed, and is often used in open-water exploration and underwater operations in known environments. However, there are still several problems in exploring the interiors of complex underwater environments, which are essential for scientific exploration and industrial applications, such as caves and shipwrecks. This study aims to complete the exploration of the environment of structures under water bodies. A real-time manipulative small underwater robot was designed and developed. The robot’s autonomous depth control and linear motion-assisted control are also realized by real-time sensor data processing, which provides stability and operability to move in small areas and complex environments. The sonar system is used to construct a submap for small-area scanning. Finally, by combining the odometer algorithm and contour extraction, the submaps are stitched together to construct a complete map of the internal underwater environment.