The invention provides a method for controlling the pressure of a walking mechanism of an excavator. The method is characterized by comprising the following steps of: connecting a walking pressure switch to a pipeline between a walking cutoff valve and a convergence valve; detecting by using a pilot pressure sensor to obtain a specific value of a pilot pressure; judging whether the walking mechanism is in an idle speed state or walking state according to the pressure value; when the walking mechanism is in the walking state and if the pilot pressure is greater than a third set threshold value, opening a secondary pressure increasing valve by using an electric control system; making pressure increasing pilot oil flow to a main overflow valve through the secondary pressure increasing valve;increasing the set pressure of the main overflow valve by 10-15 percent; and simultaneously, judging the on and off state of the walking pressure switch by using the electric control system. In the invention, only one walking pressure switch is added in the conventional hydraulic system, and the control way is changed simultaneously, so that the walking capability and the practical operation capability of the excavator can be increased, the oil consumption and the noise are effectively lowered, the service life of the hydraulic system is prolonged, and the requirement of a user is better met.