The National Court, which handles major criminal cases, said the bank's stock listing had received approvals “from all necessary institutions”.
The listing was very popular with small investors, who lost their shirts when the state had to nationalise the bank the following year and inject €22 billion ($25.7 billion) to keep it from collapsing at a time when the Spanish economy was mired in crisis.
That in turn prompted the state to borrow €41 billion from the European Union to keep the rest of Spain's banking sector afloat as investor confidence had been shaken.
Rato, 71, who led the International Monetary Fund from 2004 to 2007, led the merger in 2010 of Caja Madrid, which he headed at the time, and six other struggling regional savings banks into Bankia.
The image of a smiling Rato ringing the bell and sipping champagne on July 20, 2011 to mark the start of Bankia's listing has since become a symbol of the scandal.
More than 300,000 small shareholders bought share packages for a minimum of €1,000, attracted by a major advertising campaign and the profits boasted by the bank.
But in 2012, after a disastrous year that saw its share price collapse, the bank admitted that in the year it listed, it had actually made a loss of close to three billion euros.
Rato, head of the bank at the time, was accused of falsifying the books and fraud to the detriment of investors. He faced a jail sentence of eight and a half years if he had been convicted.
The 31 other people and entities also on trial, among them Bankia, were also cleared.
In its ruling, the court said the prospectus for the listing contained “more than sufficient information for investors… to form a reasoned opinion on the value of the company” and contained a “comprehensive and clear description of the risks”.
It also argued that the procedure which led to Bankia's listing was “intensely and successfully supervised” by the Bank of Spain and financial market authorities which approved it.
During the trial, Rato said Spain's central bank was fully aware of everything that went on at the lender.
“The Bank of Spain would tell us 'do this, do that'. And if at some point we did something they didn't feel was good, it said no,” he told the court.
A group of activists dubbed “15MpaRato”, which launched one of the first lawsuits that led to the trial, called the ruling “shameful” and said the listing was a “scam”.
Both sides have five days to appeal the ruling.
The state, which still holds just under 62 percent of Bankia, has recognised several times that it will never be able to recover much of the money it disbursed.
The directors of Bankia and its rival Caixabank last month approved a merger to create Spain's biggest domestic bank by assets. The Spanish state will hold a 16.1 percent share in the new group.
Since October 2018, Rato has been serving a four-and-a-half-year sentence for misusing company credit cards for personal expenses while working at Bankia between 2010 to 2012.
Rato was economy minister and deputy prime minister in the conservative government of Jose Maria Aznar from 1996 to 2004, before going on to head the IMF.