To address the issue of stress concentrations afflicting non-circular tunnels caused by void defects, a method of analytical solution is introduced, which is grounded in the theory of complex variables. Firstly, the mapping function of the non-circular tunnel containing a void was obtained; then the power series method was implemented to determine the coefficients of the stress function and formulate the solution equations. Finally, the analytical solution was verified by simulation through Flac3D software. The effects of pore depth, width, stress inclination and stress ratio on the stress and deformation of the tunnel are considered analytically using the method of this paper. The findings indicate a strong agreement between the analytical solution and the numerical solution, and there is an obvious stress concentration at the defect location. The void depth, width, main stress field inclination and stress ratio contribute remarkably to the stress concentration at the location of tunnel void defects, thus affecting the mechanical behavior and safety condition after tunnel excavation. The results of the study propose a fast and accurate elasticity calculation method for non-circular tunnel excavation problems, offering a valuable reference to similar tunnel projects in design, construction and stability analysis.