Although the manufacturing and assembling technology of the machine tool has become more and more mature, eccentricity of the spindle is still unavoidable and is an important source of spindle vibration. When the spindle rotation frequency is close or equal to the natural frequency of the spindle structure, spindle vibration will increase sharply, causing resonance (resonance speed). The high-speed spindle is more prone to cause resonance speed due to its wide speed range and large amount of centrifugal force. Machining at the resonance speed not only degrades the surface quality but also accelerates the degradation of the spindle performance. Aiming at this problem, this paper presents a G instruction-domain-based resonance speed measurement method. This method realizes the measurement by performing the spindle acceleration signal analysis in the instruction domain, which overcomes the shortcomings of the hammer impact test-based method (complicated operation), it is suitable for in situ application. The effectiveness of the proposed method was verified by hammering modal test and motor vibration test. The influence of resonance speed on the milling surface quality and the influence of different tools on the resonance speed was explored. Based on the proposed method, a portable spindle resonance speed measurement tool and a CNC system resonance speed avoidance module were developed.