Cait Reilly and Jamie Wilson both succeeded in their claims that the unpaid schemes were legally flawed. They had lost their original case, but part of this decision has now been reversed by the Appeal Court. Judges quashed the regulations underpinning the work schemes.
The government said it was seeking permission to appeal to the Supreme Court.
It will also bring new, more precise, regulations to Parliament later in the day in an attempt to maintain the schemes.
The government knows it needs to rewrite its unlawful regulations quickly. Only then will jobseekers told, from now, to take part in back-to-work programmes still face the threat of losing their benefit if they refuse.
Miss Reilly said that in November 2011 she had to leave her voluntary work at a local museum and work unpaid at the Poundland store in Kings Heath, Birmingham, under a scheme known as the "sector-based work academy".
She was told that if she did not carry out the work placement - which, she said, involved stacking shelves and cleaning floors - she would lose her Jobseeker's Allowance.
Mr Wilson was told that his Jobseeker's Allowance would be stopped after he refused to take part in the Community Action Programme, which his lawyers said would have involved him working unpaid for 30 hours per week for six months.
Solicitors for the Claimants and the Government gave contradictory interprretations of what the ruling meant.
Solicitor Tessa Gregory, of Public Interest Lawyers, which represented the duo, said: "This judgment sends Iain Duncan Smith back to the drawing board to make fresh regulations which are fair and comply with the court's ruling.
"Until that time, nobody can be lawfully forced to participate in schemes affected such as the Work Programme and the Community Action Programme.
"All of those who have been stripped of their benefits have a right to claim the money back that has been unlawfully taken away from them."
A spokesman for the DWP took a different line:
"We have no intention of giving back money to anyone who has had their benefits removed because they refused to take getting into work seriously. We are currently considering a range of options to ensure this does not happen."
The government also pointed out that the Appeal Court judges backed the High Court's view that requiring jobseekers to participate in the scheme did not breach their human rights.
It said that it would bring new regulations forward straight away, allowing these schemes to continue.
"The court has backed our right to require people to take part in programmes which will help get them into work. It is ridiculous to say this is forced labour. This ruling ensures we can continue with these important schemes," said Employment Minister Mark Hoban.
Pat Harrington, General Secretary of Solidarity, commented:
"People need to get back into work but mandatory schemes are not the answer. If someone gives labour they should be paid in return. Compulsory unpaid labour is not something we should countenance in Britain. It is a dangerous distortion of the market. I am disppointed that the Appeal Court did not uphold the human rights element of the claim as forcing people to do unpaid work appears to be forced labour to me."