Lunar environmental adaptability and gait control are significant for developing a walkable lunar lander (WLL). However, gait planning for the WLL is challenging due to the optimization process required for the stable margin sequence. To overcome this concern, this study develops a new Center of Gravity (COG) trajectory planning algorithm appropriate for a WLL that will enhance walking performance. Specifically, our method designs an adaptive back-stepping controller (ABSC) based on the established kinematic model to compensate for the influence of parameter uncertainties on the single-leg motion system. Compared to the classic PID control, our method's motion trajectory accuracy on the joint drive position is improved by 3.2 times. Additionally, various experiments on the prototype device verify the foot's motion trajectory. Furthermore, a new COG trajectory planning algorithm is proposed that combines the Jacobian COG and the centroid of a support polygon, including a foot contact constraint. This strategy effectively balances optimization and search operations, improving the lander's passing ability and stability in complex terrains. Moreover, this work considers the longitudinal stability margin (LSM) method and minimum stability margin of the lander as a sequential optimization problem. Hence, the hierarchical control architecture is established to compensate for the mission and environment changes, improving computational efficiency. Finally, the developed method is applied to the simulation prototype to verify its performance in various environments. The experimental results demonstrate that the proposed method allows the WLL to move in various environments and improves its stability in simulation experiments. At the same time, compared with the foot endpoint trajectory gait control method, our method can improve the walking efficiency by 8.56% and 6.58%, respectively.