In order to reduce the accidents caused by static electricity, simulative experiments were carried out to obtain the relationship between electrostatic and six factors in petroleum pipeline transportation. The electrostatic current generated in simulative petroleum pipeline was measured. After several groups of experiments, six factors were determined to be of great influence on the electrostatic generation, namely the length of petroleum pipeline, the diameter of pipeline, the roughness of pipeline, the velocity of oil flow, the electrical resistivity and the kinematic viscosity of oil material in the pipeline. The experimental data are analyzed based on the Generalized Gray Incidence Model, and then from its ranking results, the most critical factor and lesser important ones can be distinguished. The experimental data and analysis results show that the velocity of fluid is the most critical factor leading to the generation of static electricity.