The realization of Hadamard Transform (HT) encoding mask is the key technology to Hadamard Transform Spectroscopy. In order to realize HT mask using DMD, the theory of HT and principle of light modulate of DMD are explained. DMD is controlled by programming to realize cyclic HT mask based on S-matrix. The performance of the mask is also verified by building a spectroscopy experiment system, and higher SNR spectrum information is acquired. The results indicate that the SNR in HT mode is 38.4323 while 11.3446 in scanning mode, the gain of SNR is 3.38. It can be concluded that the HT encoding mask that realized by DMD is feasible, spectrum signal’s intensity and SNR can be improved effectively.