The statement sparked outrage from several quarters of the Jewish community, including Karen Pollock, chief executive of the Holocaust Educational Trust, who said: "Dreyfus was a French artillery officer falsely accused of treason because he was Jewish.
"Go figure how or why John McDonnell could make such an inappropriate comparison with the Assange case.
"Outrageous, ridiculous and so deeply offensive."
Claudia Mendoza, the Jewish Leadership Council's policy director, also said: "John McDonnell's analogy is crass and offensive.
"Julian Assange's case cannot be compared to the Dreyfus Affair, one of the most important moments in Jewish history."
However, when challenged about his statement on Twitter, Mr McDonnell doubled down, saying: “It was quite clear what I meant.
“Just like the Dreyfus case, the legal action against Julian Assange is a major political trial in which the establishment is out to victimise an innocent. On that basis, of course it’s right to assert than it’s a parallel.”
Assange could face decades in a US prison if charged with violating the Espionage Act by publishing classified information through WikiLeaks.
In 1894, Dreyfus was convicted of treason for allegedly selling military secrets to the Germans and was sent to a penal colony in a case that was widely alleged to be motivated by antisemitism.
He was eventually exonerated following a long campaign on his behalf that included intellectuals such as novelist Emile Zola.