To gain square laser output with high beam quality and super-Gaussian flat-topped distribution,the high-energy laser needs spatial shaping for geometric outline and strength distribution of injected Gaussian laser pulse.High-energy laser owns multi-stage energy amp lification unit.The shaping device is used for online real-time repairing of gain inequality of the amplification unit while used for shaping.Digital micro-mirror device (DMD) is a spatial shaping device based on digital modulation with excellent performance.It has the advantages of high contrast ra tio,high resolution ratio and strong anti-jamming capability.Thus,it is very suitable for high electromagnetic interference working environment of high-energy laser.The algo rithm and experiment of beam spatial shaping are researched on the basis of digital micro -mirror device. Through secondary shaping,near field modulation degree of the beam (the ratio of maximum value of light intensity to average value) decreases to 1.33∶1from 1.85∶1af ter primary shaping, improved by 28.1%.The energy loss is 35.7%.Meanwhile,the beam after secondary s haping has very strong stability.Under the condition that input shaping diaphragm rema ins unchanged,the dispersion of near field modulation of output beam is only 1.77%. Thus,the influence of environmental changes and random distribution of noise on beam intensity distribution is reduced.