A method for borehole gasification of a coal formation relates to the mining industry, in particular, to underground gasification of coal and use of thermal energy released in this case to generate electrical energy. According to the invention, a blind borehole is equipped with a tubular waste heat exchanger, in which a supply pipe with a liquid heat carrier is located inside the air duct. The tubular waste heat exchanger is equipped with several air passage pipes, which, when slowing down the process of underground coal gasification, direct the air mixture through radial tubes outside the tubular waste heat exchanger into the borehole. The invention makes it possible to increase the volumes and provides the quality of the produced generator gas, and also contributes to a more efficient utilization of the thermal energy of the underground gas generator