In order to realize the path planning of continuum robot for inspecting defects in the aircraft fuel tank compartment, an approach based on Q-learning and Three-segment Method was proposed, and the posture of the robot meeting the inherent and spatial structure constraint requirements was planned. Firstly, the simulation model of the aircraft fuel tank was established. Moreover, the workspace was rasterized to decrease the computing complexity. Secondly, the Q-learning algorithm was applied and the path from the initial point to the target was generated. In terms of target guided angle and three-segment method, the joint variables corresponding to each transition point on the path could be obtained. Finally, the robot reached the target by progressively updating the joint variables. Simulation experiments were implemented, and the results verified the effectiveness and feasibility of the algorithm,