According to a ruling by Judge James Peck of the US Bankruptcy Court, the financial services provider broke bankruptcy laws in the US when it seized the funds just weeks after Lehman Brothers collapsed in 2008.
The court official ordered BofA to repay the $500 million plus any interest built up since the seizure of the capital, describing the firmâs acquisition of the money as 'brazen'.
Judge Peck said: âThe actions taken were surprising and, quite frankly, disappointing for a leading financial institution that should care a great deal about its reputation.
âIt is difficult to understand how BofA could have thought that taking the money was the right thing to do without first seeking permission from the court.â
A spokesperson for BofA said: âWe are disappointed with the court's decision, and we continue to believe that our actions were fully supported by well established New York law and the unambiguous language of the bankruptcy code.â
BofA is thought to be appealing in a bid to overturn the ruling by the judge.
Lehman Brothers Holdings has launched legal bids to recover funds from other banks including JPMorgan and Barclays.
By Jim Ottewill