This study emphasizes on optimizing the value of machining parameters that will affect the value of surface roughness for the deep hole drilling process using moth-flame optimization algorithm. All experiments run on the basis of the design of experiment (DoE) which is two level factorial with four center point. Machining parameters involved are spindle speed, feed rate, depth of hole and minimum quantity lubricants (MQL) to obtain the minimum value for surface roughness. Results experiments are needed to go through the next process which is modeling to get objective function which will be inserted into the moth-flame optimization algorithm. The optimization results show that the moth-flame algorithm produced a minimum surface roughness value of 2.41μ compared to the experimental data. The value of machining parameters that lead to minimum value of surface roughness are 900 rpm of spindle speed, 50 mm/min of feed rate, 65 mm of depth of hole and 40 l/hr of MQL. The ANOVA has analysed that spindle speed, feed rate and MQL are significant parameters for surface roughness value with P-value <0.0001, 0.0219 and 0.0008 while depth of hole has P-value of 0.3522 which indicates that the parameter is not significant for surface roughness value. The analysis also shown that the machining parameter that has largest contribution to the surface roughness value is spindle speed with 65.54% while the smallest contribution is from depth of hole with 0.8%. As the conclusion, the application of artificial intelligence is very helpful in the industry for gaining good quality of products