Keeping the balance of nature is important, and it is very significant to effectively control the number of species for ecosystem stability. In this paper, we propose a tritrophic Hastings-Powell (HP) model with two different time delays, and the local stability of equilibrium, Hopf bifurcation, and the existence and uniqueness of the positive equilibrium are analyzed in detail. Besides, we obtain the stable conditions for the system and prove that Hopf bifurcation will occur when the delay pass through the critical value. And the stability and direction of the Hopf bifurcation are also investigated by using the center manifold theorem and normal form theorem. Finally, some numerical examples are given to illustrate the results.