Based on the stability criteria of ZMP (Zero Moment Point), this paper proposes an adjusting algorithm that modifies walking trajectory of a bipedal robot for stable walking by analyzing ZMP trajectory of it. In order to maintain walking balance of the bipedal robot, ZMP should be located within a supporting polygon that is determined by the foot supporting area with stability margin. Initially tilting imposed to the trajectory of the upper body is proposed to transfer ZMP of the given walking trajectory into the stable region for the minimum stability. A neural network method is also proposed for the stable walking trajectory of the biped robot. It uses backpropagation learning with angles and angular velocities of all joints with tilting to get the improved walking trajectory. By applying the optimized walking trajectory that is obtained with the neural network model, the ZMP trajectory of the bipedal robot is certainly located within a stable area of the supporting polygon. Experimental results show that the optimally learned trajectory with neural network gives more stability even though the tilting of the pelvic joint has a great role for walking stability.