Determination of reasonable protective coal pillar width has a great significance for the safety and stability of the coal seam working face and the surrounding structures and facilities. For studying the reasonable width of protective coal pillar, based on the platform of ABAQUS, program with the PYTHON language to make dynamic model which can simulate the dynamic changes of different width. Then the deformation law of floor roadway under different protection coal pillar width is analyzed. The finite element optimization analysis program is compiled based on MATLAB, and the minimum deformation of roadway and protective coal pillar is used as the optimization goal to make calculation for the dynamic model, and the reasonable width of protective coal pillar is proposed. Through the comparison between the simulation result and the field monitoring data, validity of the calculation result and rationality of the method are verified. The research results provide the reference for the setting of protective coal pillar for similar mining conditions.