In this paper, Subpopulation Firefly Algorithm is proposed for optimization of machining parameters in multi-pass turning and multi-pass face milling operations. Basic Firefly Algorithm is modified with the aim to avoid space of local minimum and to meet the operation constraints in each iteration step. For that purpose, the following modifications are made: one firefly population is divided into two, a crossover operator is introduced and the searching for new design variables is continued until constraint functions are fulfilled. For turning operation, optimization is carried out for one objective: minimization of production cost. For face milling operation, multi-objective optimization is used for minimizing production cost and machining time, and maximizing profit rate at the same time. In both cases of multi-pass machining operations, optimization process implies meeting all operation constraints. For multi-pass turning operation, the best results from literature are confirmed with good convergence and low value of standard deviation. For multi-pass milling operation, better results are achieved compared with existing results from literature. The proposed algorithm showed capability of achieving global optimum for complex optimization problems.