In order to meet the automatic injection and cleaning functions of digital PCR detector, a double-layer injection needle and its liquid path device were designed. Firstly, the finite element analysis of the injection needle was carried out based on ANSYS Workbench. Combined with the theoretical calculation, it is found that the stability is poor and the bending stiffness is insufficient. Then, to solve this problem, a spiral spring was added between the inner needle and the outer tube to optimize the injection needle, and the influence of spring position, length and pitch on the deformation of the injection needle was explored. Finally, considering the strength, deformation and cleaning effect, it is determined that the best scheme is that the spring is 5mm from the outlet of the outer tube, the length is 5mm and the pitch is 1mm. At this time, the maximum deformation caused by 0.1N lateral force is reduced from 0.527mm to 0.158mm, the maximum stress is reduced from 151.5MPa to 86.25MPa and the critical buckling pressure is increased from 4.276N to 28.468N. After optimization, the strength, stiffness and stability of the injection needle are guaranteed. The research results are of great significance to the design and optimization of the injection needle.