We study higher dimensional hairy black holes of quartic quasi-topological gravity in the framework of non-abelian power-Yang–Mills theory. It is shown that real solutions of the gravitational field equations exist only for positive values of quartic quasi-topological coefficient. Depending on the values of the mass, conformal coupling constants, quasi-topological coefficients, Yang–Mills magnetic charge, and nonlinearity parameter, they can be interpreted as black holes with one horizon, at most three horizons and naked singularity. It is also shown that the solution associated with these black holes has an essential curvature singularity at the centre r=0. Thermodynamic and conserved quantities for these hairy black holes are computed and we show that the first law has been verified. We also check thermodynamic stability in both canonical and grand canonical ensembles. In addition to this, we also formulate new power-Yang–Mills hairy black hole solutions in pure quasi-topological gravity. The physical and thermodynamic properties of these black holes are discussed as well. It is concluded that unlike Yang–Mills black holes without scalar hair there exist stability regions for the power-Yang–Mills hairy black holes in grand canonical ensemble. Finally, we discuss the thermodynamics of horizon flat power-Yang–Mills rotating black branes and analyze their thermodynamic and conserved quantities by using the counter-term method inspired by AdS/CFT correspondence.