The invention discloses a programmable intelligent electric spindle. The programmable intelligent electric spindle comprises a front bearing pedestal, a rear bearing pedestal, a spindle body, a motor rotor, a motor
stator, a cooling
water jacket, an actuation bearing, an annular pressing block, a tool
handle, a controller, a cooling liquid input pipeline, a cooling liquid outlet pipeline and a shell of a hollow structure. An annular cavity is formed between the motor
stator and the shell, and the cooling
water jacket is arranged in the cavity; a plurality of first
piezoelectric actuators are evenly arranged between the annular pressing block and the front bearing pedestal in a divided manner in the circumferential direction, and a plurality of grooves are arranged on the inner side of the rear bearing pedestal in the circumferential direction; second
piezoelectric actuators are embedded in the grooves; an
electromagnetic valve is arranged on the cooling liquid input pipeline; and the output end of the controller is connected with the control end of the
electromagnetic valve, and the control ends of the first
piezoelectric actuators and the control ends of the second piezoelectric actuators are connected. Vibration and shaft end deformation of the spindle body can be reduced, temperature rising of the spindle body is regulated and controlled, the structure is simple, and the requirements of parts for
machining quality diversity can be met.