The issue of mean-square delayed consensus of nonlinear multi-agent systems (NMASs) suffered from denial-of-service (DoS) attacks under Markov switching topologies and dynamic event-triggered control (DETC) is studied. Firstly, the networks among agents are inevitably attacked because the communication networks are open access. DoS attacks that are destructive, stealthy and easy to realize are considered. Secondly, DoS attacks can result in random changes of the communication topologies, which are assumed to be uncertain nonhomogeneous Markov switching (UNMS) topologies with partially unknown transition rates (TRs). Then, in order to reduce unnecessary signal transmission, the adaptive control law and DETC are adopted. The sufficient conditions of mean-square delayed consensus of NMASs in term of random analysis method and distributed control theory are explored. Finally, the exactness of the results and the effectiveness of the methods are validated by the example given.