Addressing crowds of Jeremy Corbyn supporters at London’s School of African and Oriental Studies, Mr McDonnell claimed the current turmoil in the party was “a battle for democracy”.
Mr McDonnell has stuck by the embattled Labour leader since he lost a confidence vote among MPs by 172 to 40 but refused to resign, insisting he still has a “people’s mandate” to lead following his landslide victory in the Labour leadership elections last summer.
A defiant Mr McDonnell said: “Jeremy won a mandate last summer and there are a handful of MPs who couldn’t accept that mandate - we’ve been expecting a coup any time since then.
“They said we couldn’t win parliamentary seats but in every parliamentary by-election we have increased the Labour majority.
“The Parliamentary Labour Party meeting - it’s not a meeting to enjoy. It was like a lynch mob without the rope.
“MP after MP was getting up telling Jeremy to resign.”
He added: “If Jeremy had walked on water during the (referendum) campaign he would have been blamed for the loss. What we are watching is a leadership coup.
“We have been trying to explain to some members of the PLP there’s a recent Greek invention and it’s called democracy.
“What democracy means is that people come together with each having a vote, and when that vote has a majority, that decision should be abided by - this is a battle for democracy.”
More than 60 MPs have resigned since Mr Corbyn sacked shadow foreign secretary Hilary Benn in the early hours of Sunday morning, after Mr Benn told him MPs had no confidence in his ability to win an election.
His party have accused him of leading a lacklustre Remain campaign for the party in the lead up to the EU referendum.