Understanding a safety distance necessary to avoid the harms of a shock wave to underground personnel may have great significance to the safety of underground personnel, disaster relief efforts, and the treatment of the gas explosion in coal mines. Through a roadway model with a cross-section area of 80 × 80 mm2 and a length of 100 m, the explosive attenuation characteristics of a methane/air mixture with a fuel concentration of 9.5% and a filling ratio of 10% were simulated by using AutoReaGas software for various initial temperatures (248–328 K) and initial pressures (20–200 KPa). The results show that the safety distance increases with the increase of the initial temperature and follows the changing trend of decreasing, increasing, and decreasing again with the increase of the initial pressure. The time of flame arrival to each point away from initiation and the maximum distance of flame propagation both increase with the increase of the initial temperature, but they are almost the same for various initial pressures. Before the attenuation of the shock wave occurs, increasing the initial temperature increases the maximum temperature, but decreases the peak overpressure, the maximum density, the maximum combustion rate, and the maximum gas velocity. However, increasing the initial pressure increases the peak overpressure, the maximum density, and the maximum combustion rate. The influences of the initial temperature and the initial pressure on these parameters at the longer distance points from the ignition source are greater than those at the shorter distance points.