The invention discloses a device for testing dynamic stiffness and constant pressure of a high-speed electric spindle, comprising a base, a loading system, a lubricating and cooling system and an automatic control unit, wherein the loading system comprises a hydraulic cylinder component, a hydraulic cylinder oil way system and a loading rod. In the invention, a loading value and a deformation value are collected through a pressure sensor and a displacement sensor by adopting a hydraulic cylinder and combining the automatic control unit; and the control unit controls the loading pressure of the hydraulic cylinder according to the variation of the loading value and the deformation value and can detect the high-speed electric spindle under the condition of dead load so as to avoid frictional heating generated by mechanical contact in a high-speed running state of the high-speed electric spindle and influence of mechanical wear to test precision and realize continuous and stable dynamic loading and real-time measurement of the high-speed electric spindle, therefore, the invention has high measurement precision and can conveniently finish various functions including data collection, display, storage, analysis, calculation, control, trigger and the like. The whole device has the advantages of compact structure, convenient use and low cost.