An enhanced dung beetle optimization algorithm (EDBO) is proposed for nonlinear optimization problems with multiple constraints in manufacturing. Firstly, the dung beetle rolling phase is improved by removing the worst value interference and coupling the current solution with the optimal solution to each other, while retaining the advantages of the original formulation. Subsequently, to address the problem that the dung beetle dancing phase focuses only on the information of the current solution, which leads to the overly stochastic and inefficient exploration of the problem space, the globally optimal solution is introduced to steer the dung beetle, and a stochastic factor is added to the optimal solution. Finally, the dung beetle foraging phase introduces the Jacobi curve to further enhance the algorithm’s ability to jump out of the local optimum and avoid the phenomenon of premature convergence. The performance of EDBO in optimization is tested using the CEC2017 function set, and the significance of the algorithm is verified by the Wilcoxon rank-sum test and the Friedman test. The experimental results show that EDBO has strong optimization-seeking accuracy and optimization-seeking stability. By solving four engineering optimization problems of varying degrees, EDBO has proven to have good adaptability and robustness.