DC stray current is one of the major cause of gas explosion in underground coal mine, and has serious threat to the safety production of coal mine. In order to solve this problem, a distributed parameters mathematical model of DC stray current was established on the basis of generation mechanism of stray current. The effects of related parameters on the extent of stray current were analyzed based on the distributed parameters mathematical model, and conclusions were obtained: with the increase of current of locomotive, power supply range and track resistance, the stray current increases linearly, stray current can be reduced by reducing locomotive current, shortening the power interval length and reducing track resistance; When transition resistance between the rail and the earth is below a certain value , the stray current will increase sharply, an effective measure to limit stray current is to ensure insulation between the tail and earth.