The efficiency of hydrogen production by the pyrolysis of lignite from Dongsheng in Inner Mongolia was investigated. Three pyrolysis methods, namely, temperature‐programmed pyrolysis, isothermal pyrolysis, and microwave pyrolysis, were applied and compared. The online analysis of the composition of the pyrolysis gas showed the effects of the different pyrolysis methods on the gas composition and the yield of hydrogen. The reasons were discussed on the basis of infrared thermography of the semicoke samples, FTIR spectroscopy, and SEM analysis. The microwave pyrolysis was improved by the addition of a shimming device to the furnace chamber. Consequently, the efficiency of hydrogen production by the pyrolysis of lignite was increased substantially, and the yield of hydrogen surged by 430 % compared with the yield for the original microwave pyrolysis.