The invention relates to a system and method for measuring resonant frequency of near-field microwave resonator, which utilizes electron spin resonance and diamond nitrogen vacancy defect (NV color center) to pull the oscillation frequency and the intensity of the microwave to place the diamond in a static magnetic field. In the process, the microwave pulse frequency and the magnetic field intensity are changed to perform photodetection magnetic resonance and rabbi oscillation measurement, and a series of rabbi oscillation frequencies are obtained, from which the resonator resonance frequencyis extracted. The measuring system comprises an optical module, a microwave module, a magnetic field device, a diamond and a control device, wherein the diamond is embedded with a NV color core; theoptical module can generate and guide light to the diamond, and simultaneously detect the fluorescent signal emitted by the diamond. The microwave module can generate a microwave control field and load it onto the diamond. The magnetic field device can generate a static magnetic field. The invention can measure the resonant frequency and the effective magnetic field strength of the microwave resonator practically and accurately, has high precision, and can be used under near-field conditions.