The stability of slope is critical important topic in rock mass engineering. In Panzhihua #7 Coal Mine, the coal mining is occurred under the slope, to obtain the optimal mining width, 125 numerical simulations were conducted, and the corresponding FOS was calculated. From the analysis of the numerical simulation results, it can be found that FOS decrease and then increase with increasing of filling length, meanwhile, the FOS is minimum value when the filling length is within the ranges of 10m and 20m, which is under the toe of slope. Furthermore, the minimum FOS decrease with increasing of mining width. Considered the stability of the slope and mining economy, the mining width is set to 6m, and the numerical simulation results is applied to the engineering practice. To guarantee the safety of the slope, some monitoring points were distributed on the slope, the displacement from numerical simulation and engineering practice is quite close, indicating the numerical simulation results is reliable, and the mining width is reasonable.