The path planning of Unmanned Underwater Vehicle (UUV) is a crucial aspect of their operation in underwater environments, Meta-heuristic algorithms are extensively utilized for addressing UUV path planning problems. To address the limitations of the traditional dung beetle optimization algorithm (DBO), including inadequate convergence speed and precision in two-dimensional UUV path planning, and its propensity for local optima, an improved dung beetle optimization algorithm (IDBO) is introduced which employing a suite of refinement strategies. Furthermore, the solution capability of the IDBO is validated through the CEC2017 test suite and two-dimensional raster maps that replicate actual underwater environments. The simulation results demonstrate the robust problem-solving capacity of the IDBO, applicable to both benchmark functions and real-world scenarios, affirming the efficacy of the enhancement strategies in practical applications.