In this article, we consider the cooperative tracking problem for a class of nonlinear multiagent systems (MASs) with unknown dynamics under denial-of-service (DoS) attacks. To solve such a problem, a hierarchical cooperative resilient learning method, which involves a distributed resilient observer and a decentralized learning controller, is introduced in this article. Due to the existence of communication layers in the hierarchical control architecture, it may lead to communication delays and DoS attacks. Motivated by this consideration, a resilient model-free adaptive control (MFAC) method is developed to withstand the influence of communication delays and DoS attacks. First, a virtual reference signal is designed for each agent to estimate the time-varying reference signal under DoS attacks. To facilitate the tracking of each agent, the virtual reference signal is discretized. Then, a decentralized MFAC algorithm is designed for each agent such that each agent can track the reference signal by only using the obtained local information. Finally, a simulation example is proposed to verify the effectiveness of the developed method.