This article investigates the leader‐follower consensus control problem of a feedforward nonlinear multiagent system under denial‐of‐service (DoS) attacks. Compared with the existing results on the consensus control of multiagent systems under DoS attacks, this article considers a class of feedforward multiagent systems with nonlinear functions that are less conservative, and takes into account asynchronous DoS attacks with attack detection delay. To address these problems, firstly, a new class of topological switching sequences and Laplacian matrices are designed based on the properties of the considered DoS attacks to convert the DoS attacks with attack detection delay problems into a class of topological switching problems. Then, a distributed dynamic gain compensator and an output feedback controller are constructed for each follower by using the output information of neighbor agents that are not intercepted by the attacks. Afterwards, by using piecewise Lyapunov functions, it is proven that if the DoS signal satisfies the condition of time‐varying average dwell time (ADT), then the followers can asymptotically track the state of the leader. Finally, a numerical example is provided to verify the effectiveness of the control algorithm.