In the domain of bionic walking control for biped robots, optimizing the parameters of the central pattern generator (CPG) presents a formidable challenge due to its high-dimensional and nonlinear characteristics. The traditional particle swarm optimization (PSO) algorithm often converges to local optima, particularly when addressing CPG parameter optimization issues. To address these challenges, one improved particle swarm optimization algorithm aimed at enhancing the stability of the walking control of biped robots was proposed in this paper. The improved PSO algorithm incorporates a spiral function to generate better particles, alongside optimized inertia weight factors and learning factors. Evaluation results between the proposed algorithm and comparative PSO algorithms were provided, focusing on fitness, computational dimensions, convergence rates, and other metrics. The biped robot walking validation simulations, based on CPG control, were implemented through the integration of the V-REP (V4.1.0) and MATLAB (R2022b) platforms. Results demonstrate that compared with the traditional PSO algorithm and chaotic PSO algorithms, the performance of the proposed algorithm is improved by about 45% (two-dimensional model) and 54% (four-dimensional model), particularly excelling in high-dimensional computations. The novel algorithm exhibits a reduced complexity and improved optimization efficiency, thereby offering an effective strategy to enhance the walking stability of biped robots.