Considering the limitations of conventional horizontal wiring method in grounding impedance measurement for substations due to wiring path issues, a new method based on vertical deep well wiring is proposed in this paper. First, the principle of measuring the grounding impedance of grounding grids in vertical deep well wiring based on zero potential compensation method is discussed, and the method of using the difference in grounding grid potential changes as the zero potential compensation value to determine the position of potential poles in vertical deep well wiring is presented. Then, the technical feasibility and electrode arrangement scheme of the method were calculated and analyzed using CDEGS simulation software. Finally, the effectiveness of the method was tested through an actual 35 kV substation engineering case. Simulation and actual measurement results show that the deeper the current pole is arranged, the larger the potential flatness range and the higher the accuracy of grounding impedance measurement. Placing the well at the edge of the grounding grid is slightly better than placing it in the middle. The deviation between the method described in the actual substation grounding impedance measurement and the conventional horizontal wiring method is about 5.86%, and the deviation from the simulated calculation value is about 5.14%, both of which are within the acceptable error range of engineering. This indicates that the proposed method can be effectively applied to the measurement of grounding impedance of grounding grids in practical engineering.