Energy is one of the primary challenges in the long-term operation of robotic fish. The research on combining wave energy-harvesting technology with robotic fish for energy supplementation is not extensive, and there is insufficient comprehensive analysis on energy harvesting from waves and energy costs during swimming. Therefore, the energy self-sufficiency of multi-joint robotic fish is investigated by employing the coupling method of smoothed particle hydrodynamics (SPH) and multi-body dynamics in this study. A reversible energy conversion mechanism is applied to the robotic fish, serving as a driving system during swimming and as a power take-off (PTO) system during energy harvesting. The energy costs of the multi-joint robotic fish under various undulation parameters (including amplitude, frequency, and body wavelength) are analyzed, along with an examination of the influence of the PTO system on energy harvesting. The results show that, compared to the undulation amplitude and body wavelength, the undulation frequency has the greatest impact on swimming efficiency and energy costs, with low-frequency swimming being advantageous for efficient energy utilization. Additionally, the damping coefficient of the PTO system directly affects energy-harvesting efficiency, with higher energy-harvesting power achievable with an optimal PTO system parameter. Through a comprehensive analysis of energy costs and energy harvesting, it is concluded that the achievement of energy self-sufficiency for multi-joint robotic fish in marine environments is highly feasible.