The Mayfly Optimization Algorithm (MOA), as a new biomimetic metaheuristic algorithm with superior algorithm framework and optimization methods, plays a remarkable role in solving optimization problems. However, there are still shortcomings of convergence speed and local optimization in this algorithm. This paper proposes a metaheuristic algorithm for continuous and constrained global optimization problems, which combines the MOA, the Aquila Optimizer (AO), and the opposition-based learning (OBL) strategy, called AOBLMOA, to overcome the shortcomings of the MOA. The proposed algorithm first fuses the high soar with vertical stoop method and the low flight with slow descent attack method in the AO into the position movement process of the male mayfly population in the MOA. Then, it incorporates the contour flight with short glide attack and the walk and grab prey methods in the AO into the positional movement of female mayfly populations in the MOA. Finally, it replaces the gene mutation behavior of offspring mayfly populations in the MOA with the OBL strategy. To verify the optimization ability of the new algorithm, we conduct three sets of experiments. In the first experiment, we apply AOBLMOA to 19 benchmark functions to test whether it is the optimal strategy among multiple combined strategies. In the second experiment, we test AOBLMOA by using 30 CEC2017 numerical optimization problems and compare it with state-of-the-art metaheuristic algorithms. In the third experiment, 10 CEC2020 real-world constrained optimization problems are used to demonstrate the applicability of AOBLMOA to engineering design problems. The experimental results show that the proposed AOBLMOA is effective and superior and is feasible in numerical optimization problems and engineering design problems.