Purpose The purpose of this paper is to investigate the oscillating trajectory of the paddle of a fin-wheel underwater robot to enhance its propulsion efficiency in water. This robot can be used for underwater detection and military operations. Design/methodology/approach By studying the propulsion mode of underwater fin-based robots, it is found that such robots periodically generate a large reverse thrust during the swing process, resulting in low propulsion efficiency. Therefore, according to the propulsion characteristics of the oscillating paddle in the underwater environment, the hydrodynamic model and physical constraints of the oscillating paddle are established. Then, the oscillating gait trajectory of the paddle is optimized by the trajectory optimization method. The performance of the optimized trajectory was tested in the simulation environment and the actual underwater environment. Findings The prototype of the robot was built and tested in a small swimming pool. The research results confirm that the propulsion efficiency of the optimized trajectory is higher than that of the traditional trajectory under the condition of the same amplitude and period. Specifically, the maximum speed of the robot can reach 0.24 m/s when using the optimized trajectory, which is about 50% higher than that before optimization. Originality/value The optimized trajectory with the generated impulse as the optimization target is applied to the paddle oscillation, which can improve the thrust impulse generated by the fin-wheel underwater robot during underwater motion, thereby greatly improving the underwater propulsion efficiency and moving speed.