In this paper, we formulate two new classes of black hole solutions in higher curvature quartic quasitopological gravity with nonabelian Yang-Mills theory. At first step, we consider the SO(n) and SO(n − 1, 1) semisimple gauge groups. We obtain the analytic quartic quasitopological Yang-Mills black hole solutions. Real solutions are only accessible for the positive value of the redefined quartic quasitopological gravity coefficient, µ4. These solutions have a finite value and an essential singularity at the origin, r = 0 for space dimension higher than 8. We also probe the thermodynamic and critical behavior of the quasitopological Yang-Mills black hole. The obtained solutions may be thermally stable only in the canonical ensemble. They may also show a first order phase transition from a small to a large black hole. In the second step, we obtain the pure quasitopological Yang-Mills black hole solutions. For the positive cosmological constant and the space dimensions greater than eight, the pure quasitopological Yang-Mills solutions have the ability to produce both the asymptotically AdS and dS black holes for respectively the negative and positive constant curvatures, k = −1 and k = +1. This is unlike the quasitopological Yang-Mills theory which can lead to just the asymptotically dS solutions for Λ > 0. The pure quasitopological Yang-Mills black hole is not thermally stable.