A measurement-while-drilling method and device assesses outburst risk and evaluates gas drainage performance of a coal seam. The device includes a compartment, a pressure sensor, a temperature sensor, a flow sensor, an electromagnetic sensor, an acoustic sensor, a wave velocity measurement module, a monitoring and control module, a power supply and a communication interface. These are installed between a drill bit and an inclinometer or a first drill pipe. Measurements are performed while drilling to obtain a real time gas parameter, lithologic and coal seam information, for on-site assessment of outburst risk. During drill bit replacement, gas pressure, temperature, flow velocity, wave velocity, electromagnetic radiation, and an acoustic signal are recorded in real time, to calculate stress of the coal seam and coal seam outburst risk. On-site measurement is done while drilling without sampling and can use multiple parameters to perform synchronous measurement to obtain a comprehensive evaluation.