Selective laser melting (SLM) is a metal-based additive manufacturing (AM) technique. Many factors contribute to the output quality of SLM, particularly the machine and material parameters. Analysis of the parameters’ effects is critical, but using traditional experimental and numerical simulation can be expensive and time-consuming. This paper provides a framework to analyze the sensitivity and uncertainty in SLM input and output parameters, which can then be used to find the optimum parameters. The proposed data-driven approach combines machine learning algorithms with high-fidelity numerical simulations to study the SLM process more efficiently. We have considered laser speed, hatch spacing, layer thickness, Young modulus, and Poisson ratio as input variables, while the output variables are numerical predicted normal strains in the building part. A surrogate model was constructed with a deep neural network (DNN) or polynomial chaos expansion (PCE) to generate a response surface between the SLM output and the input variables. The surrogate model and the sensitivity analysis found that all five parameters were important in the process. The surrogate model was combined with non-intrusive optimization algorithms such as genetic algorithms (GA), differential evolution (DE), and particle swarm optimization (PSO) to perform an inverse analysis and find the optimal parameters for the SLM process. Of the three algorithms, the PSO performed well, and the DNN model was found to be the most efficient surrogate model compared to the PCE.