In recent years, Light-emitting diodes (LEDs) are dominating the traditional lighting system. Besides mercury-free, they have small size, good break resistance and long life. Although LEDs are cool to touch, they generate a lot of unnecessary heat inside the gadgets. It is important to remove the heat using efficient thermal management component such as heat sink. Instead of using a conventional manufacturing process, selective laser melting (SLM) process is used to manufacture the heat sink. The quick solidification and various thermal regimes of the material during the SLM process lead to the development of residual stresses that cause the part distortion and harm the mechanical properties of the component. The objective of the current study is to find the optimum value of laser power, scanning speed, and hatch spacing to bring down the residual stress and distortion in the SLM process to an acceptable range. Residual stress and distortion values of the heat sink are simulated using MSC Simufact additive and ANSYS Additive software. The conflicting nature between residual stress and porosity was observed. Hence, grey relation analysis was used to convert residual stress & porosity into a single objective. Optimum process parameters obtained were, laser power 80 (W), scanning speed 950 (mm s−1), and hatch spacing of 70 The values of residual stress and porosity at optimum parameters were found to be 385.58 MPa and 12.21%. Multiple regressions algorithm of machine learning was used to form a relationship between residual stresses and porosity. It was also observed that the magnitude of residual stress and distortion were low at lower energy densities and high at higher energy densities and the residual stress and porosities were high in the z-direction.