The quadruped robot excels in tight space traversing and rough terrain locomotion because of its higher flexibility and better environment adaptability. Aiming at passing through tight spaces with free-collision, an adjustment approach of the Center of Gravity (COG) is designed to realize stable quadruped walking. The Hopf oscillator based Central Pattern Generator (CPG), utilized in this paper, can generate rhythmic control signals with different frequencies for the swing phase and the stance phase. The COG is adjusted through the rhythmic medium value transition, which automatically generates smooth trajectories according to preset parameters. We also propose a rhythmic bias compensation method to maintain the rhythmic medium positions of legs vertical to the ground to alleviate the bump caused by the body pitch. Still, an adjustment technique for the hip motion amplitude is developed to maintain the uniform motion when the robot posture changes. We evaluate the performance of the COG adjustment approach on a simulated quadruped robot model, and the simulation of the tight space negotiating of the robot model demonstrates the stable quadruped locomotion.