This paper considers the optimal harvesting of a stochastic delay predator-prey model with Lévy jumps. The traditional optimal harvesting problem of this type of model is difficult because it is difficult to get the explicit solutions of the model or to solve the corresponding delay Fokker-Planck equation of the model. In this paper, we use an ergodic method to study this problem, and establish the sufficient and necessary conditions for the existence of an optimal harvesting strategy of the model. In addition, we gain the explicit forms of the optimal harvesting effort and the maximum of the cost function. One can see that the ergodic method used in this paper can avoid solving both the model and the corresponding delay Fokker-Planck equation.