The Countryside Alliance had argued the legislation used to force the ban through in England and Wales - the 1949 Parliament Act - was illegal.
But Lord Bingham of Cornhill, head of the panel of Lords, said it was valid.
The Countryside Alliance vowed to fight on, while anti-hunt campaigners called it a "triumph for democracy".
Another challenge to the Hunting Act by the Countryside Alliance, under European human rights legislation, goes to appeal at the High Court next year.
Criminal offence
The case ruled on on Thursday was heard by nine of the 12 Law Lords, rather than the usual five, because of the constitutional importance of the case.
The Parliament Act was used by the government last November to push the hunting ban through following continuous opposition to a ban in the House of Lords.
The ban came into force on 18 February in England and Wales, making hunting with dogs a criminal offence.
Exercising hounds, chasing a scent trail and flushing out foxes to be shot are still legal.
Countryside Alliance chief executive Simon Hart said the Lords' ruling had come as "no surprise" but the fight would go on.
He said: "It was important we went down this route.
"The Law Lords, for technical reasons, found themselves unable to agree with our case - but the Attorney General takes a bit of a kicking in the judgement as well."
'People's will'
However, he added: "This judgement effectively gives the House of Commons the freedom - with no checks and balances - to do what it wants, to whom it wants, when it wants."
Mr Hart said the Alliance would continue to pursue the repeal of the Hunting Act "as vigorously as ever".
Chairman of the League Against Cruel Sports John Cooper said the ruling was a triumph for democracy, and for English and Welsh wildlife.
"We hope that the hunters will now realise that their attempts to frustrate the will of the majority of the people have been definitively quashed," he said.
"There can be no clearer message than the highest courts and the highest judges in the land confirming the Parliament Act. Hunting wild mammals with packs of dogs is a crime.
"Our message to the hunters is this - if you break the law, you will be prosecuted."