In order to solve the instability problem in calculating the Fourier expansion coefficients of the Mathieu function,a new forward-backward hybrid recursive algorithm based on the coeffi-cient ratio is proposed.First,the first n coefficients are obtained by forward recursion via the tradi-tional recursive format.Second,when the ratio of the tail coefficient is small enough and used as the initial value,the ratio factors from the last term to the nth term are calculated inversely according to the backward recursive formula proposed in this paper.Moreover,the relationship between the ratio and the coefficient is used to calculate the coefficients from the(n+1)th term to the tail.Finally,the Fourier expansion coefficients of the Mathieu functions are obtained after normalization.The numeri-cal results show that the proposed algorithm is stable and highly accurate,and the error between the approximation and the reference values can reach the machine's accuracy.The high-precision calcula-tion of the Fourier expansion coefficients of the Mathieu function can ensure the spectral accuracy of solving the external problems of partial differential equations using the elliptic non-reflection artifi-cial boundary condition and the spectral method.