Automation of fiber optic alignment is critical to reduce the cost of fiber optic devices packaging and ensure the quality of the products. The conventional fiber optic alignment method based on a hill-climbing algorithm is usually time consuming and it often fails to search the optimal alignment position. The reason is that the hill-climbing algorithm is a 1-D method, while multiple degrees of freedom (DOF) adjustments are needed in fiber optic alignment processes. The hill-climbing algorithm will be subject to noise because of intercoupling among axes. Thus, application of the pattern search algorithm in fiber optic alignment automation is developed in this work. The pattern search algorithm can adjust misalignments on multiple axial directions simultaneously. The intercoupling problem can be solved, and then the potential risk of missing the real peak can be avoided. Comparison of the simulation and experimental results between the pattern search and the hill-climbing algorithm is presented. Simulation results indicate that the pattern search algorithm converges nine times faster than the hill-climbing algorithm; it converges to the maximum coupling efficiency within eight iterations for the five degrees of freedom alignment between the laser diode and the single mode fiber. The experimental results demonstrate that the average time for locating the optimal coupling position in the x-y plane using the pattern search algorithm is reduced compared to the conventional hill-climbing algorithm; and the global convergence of the pattern search algorithm is much better than that of the hill-climbing algorithm.