A 3D transient finite element model of Inconel 718 nickel-based superalloy processed by selective laser melting was developed to study the heat flux in the molten pool under the condition of different process parameters and its effect on the temperature field and the shape of molten pool, in which a solid heat transfer module and a laminar flow module in the finite element simulation software COMSOL Multiphysics was applied. In the simulation several special phenomenon characterized with SLM process was considered, such as the interaction between the laser and material with stochastic porosity distribution on powder bed, and the nonlinear change of thermophysical properties due to the state change of material and the influence of the Marangoni effect in the molten pool. The results show that the Marangoni effect caused by the surface tension of molten pool makes the convective heat flux play a leading role in the heat transfer process in the molten pool, and its depth/width ratio is changed by changing the magnitude and direction of the heat flow, what determines the shape of molten pool. The increase in laser power or reduced scanning speed can increase the heat input per unit time, and then lead to a Marangoni convection enhancement within the molten pool, thus enlarge the size of the molten pool. The experimental results are in good agreement with the simulation results.