The election 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 there was "no arguable breach of the Broadcasting Code" and that the parties’ only recourse was to complain to Ofcom.
ITV said in a statement: "We welcome the court's decision and will continue with our comprehensive election coverage as planned."
Lord Justice Davis, sitting with Mr Justice Warby, said: "The clear conclusion of both members of this court is that, viewed overall, these claims are not realistically arguable."
He added: "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.
President of the Liberal Democrats, Sal Brinton, said this is an "incredibly disappointing verdict".
She said: "Jo Swinson is the only leader of a national party fighting to stop Brexit.
"Boris Johnson and Jeremy Corbyn should not be allowed to side step debating the issue of Brexit with someone who wants to Remain and ITV should not give them the opportunity to do so.
"That's why this is an incredibly disappointing verdict, not just for Liberal Democrats but also for democracy in this country and for every Remainer who deserves to have a voice in this debate."
Meanwhile the SNP's leader in Westminster, Ian Blackford, said: "This is a democratic outrage, let's remind ourselves that the SNP have won the last three Scotland elections."
"It is simply not on when we face the possible scenario of a hung parliament that the SNP, that could be in a balance of power situation in Westminster, are being frozen out of this debate by ITV and the other broadcasters."
He adds: "That is a failure to take account for their proper responsibilities."
ITV News Correspondent Rachel Younger has been following the legal proceedings and shared the key arguments from both sides at the High Court.
Johnson v Corbyn: The ITV Debate will be broadcast at 8pm on Tuesday 19 November, with the ITV Election Interviews broadcast at 10pm.