We demonstrated a compact gain-switched electro-optical Q-switched 1064 nm Nd:YAG laser by 885 nm laser diode pulsed-end pumping at the pulse repetition frequency of 2 kHz. In free-running mode, an output power of 14.44 W was obtained under the absorbed pump power of 23.31 W, and the slope efficiency of 77.2% approached the theoretical limitation. In Q-switching mode, we obtained a maximum single pulse energy of 3 mJ with a pulse width of 6.5 ns, corresponding to a peak power of 462 kW with a beam quality factor M 2 of 1.6.