The men included lawyer and ex-Cardiff City chief executive Alan Whiteley, and former Celtic Energy directors Richard Walters and Leighton Humphreys.
They had been accused of conspiracy to defraud the Coal Authority, Neath Port Talbot, Bridgend, and Powys councils.
But the case was dismissed and the judge said no law had been broken.
The case centred on an accusation that the men had been planning to set up a firm in the British Virgin Islands in order to transfer the leases of four Welsh opencast mining sites owned by Celtic Energy in order to avoid it having to restore the sites once coal extraction had ended.
They had been arrested in 2011 and it took nearly three years to come to court.
But after five days of legal submissions, Lord Justice Hickinbottom threw the Serious Fraud Office's case out saying that the six defendants had not acted unlawfully regardless of whether or not they had acted dishonestly.
The Serious Fraud Office (SFO) applied to the High Court to continue the prosecution under a little-used legal tool called a "voluntary bill of indictment" but that was also thrown out.
Nearly a year after the case was dismissed, the High Court sitting in Cardiff made a judgement that the legal costs of the multi-million pound case should be paid by the SFO.
The costs claim is for Â£7m, to cover the cost of 10 barristers and two separate High Court hearings.
The SFO, which disputes it, said it is "considering possible avenues of appeal" on the issue of costs.
The order to pay the costs has potential ramifications for the SFO, which has been heavily criticised for its handling of other cases including the investigation of the Tchenguiz brothers.
That case resulted in the organisation having to pay millions of pounds in costs and damages to the property developers.
Eric Evans, solicitor
Alan Whiteley, solicitor
Stephen Davies, barrister
Richard Walters, managing director Celtic Energy
Leighton Humphreys, finance director Celtic Energy
They were represented by 10 barristers including five QCs, while the SFO had two barristers
For a serious fraud to be successfully prosecuted, it's all down to sufficient evidence, well presented to the jury so it is easily understood.
But this particular case was flawed from its inception - it was difficult to prepare and present to the jury and I don't think there was joined up thinking in the way it was investigated.
This is a stark reminder for the SFO and the CPS that they should not take on cases of that magnitude, cost and resource when they don't think they have a very good prospect of success.
I imagine this has cost the SFO about 25% of its annual budget.
And I think there has to be serious questions asked over the current set up of the SFO - which is known in certain circles as the "seriously flawed office". Is it fit for purpose? Or is another branch needed to investigate cases such as these? If that is the case, that could be the death knell for the SFO.
Eric Evans said the case against them had been "wholly flawed" and it was another example of a "misconceived" SFO blockbuster case.
"In an attempt to prosecute me with an offence not known to law they have repeatedly changed their case."
Alan Whitely said he felt relieved and vindicated, adding: "Having lived and breathed it for four years, there are a number of questions the SFO need to address, in terms of how they go about their investigations.
"It's my understanding they're supposed to be an investigative body but our experience hasn't really proved that."
A multi-million pound legal bill racked-up in a failed case against six people accused of a fraud conspiracy is to be paid by the Serious Fraud Office.