A head-to-head debate between Boris Johnson and Jeremy Corbyn is due to air on Tuesday night, which will exclude any other party leaders.
The Lib Dems and the SNP contested the broadcaster's decision at a hearing in London on Monday, arguing it was unlawful because it breached impartiality rules.
But two leading judges ruled the decision was not open to challenge in the courts and that the parties' only recourse was to complain to Ofcom.
• READ MORE: Party leaders begin court action over exclusion from TV debatesLord Justice Davis, sitting with Mr Justice Warby, said that, even if the court did have jurisdiction to deal with the case, the format of the debates was a matter of "editorial judgment" and there was "no arguable breach of the Broadcasting Code".
He added: "The clear conclusion of both members of this court is that, viewed overall, these claims are not realistically arguable.
"It follows that the television debate scheduled for tomorrow evening between the leader of the Conservative Party and the leader of the Labour Party may lawfully go ahead."
ITV lawyers had told the court that the debate - and an interview with Lib Dem leader Jo Swinson due to follow it - would have been pulled from its schedule altogether if the judges had found ITV breached its duties under the code.
Lawyers for the Lib Dems had argued that Brexit is the "dominant" issue of the General Election and that "the voice of Remain has been excluded" by ITV's failure to include Ms Swinson in the leaders' debate.
Lawyers for the SNP said the party represents a range of views which would not be represented in a debate between Labour and the Conservatives, including on Brexit and Scottish independence.
ITV lawyers contended its decision was not capable of challenge in the courts and that, in any event, there is no basis for alleging any unlawful conduct on its part.
Sky News has proposed a November 28 date for its debate, while the BBC has confirmed it will host two debates, on November 29 and December 6, in addition to a series of Question Time specials.