The decision to free the men follows new evidence suggesting that officers from the Metropolitan police used violence against key witnesses and threatened them with deportation.
The Independent has also learnt that the Metropolitan police paid more than pounds 300,000 to resettle two now discredited witnesses who have been given new identities in Britain and Canada.
Samuel Kulasingham, 37, and Premraj Sivalingham, 30, both Tamils from Sri Lanka, were jailed for life at the Old Bailey in April 1988 for an attack on a house in East Ham, east London, in November 1986.
The appeal judges said yesterday that they had a 'distinct sense of unease' about the verdicts, and the convictions could not be regarded as safe or satisfactory.
The convictions were quashed because of 'wholesale breaches' of the Police and Criminal Evidence Act, non-disclosure of evidence which could have helped the defence, and the unreliability of a vital prosecution witness who may have invented his evidence.
The bomb attack was the culmination of a long-running dispute between rival groups of Tamils, mostly refugees from the civil war in Sri Lanka. Nine Tamils were sleeping in the property when it was set ablaze. Three died from the effects of breathing in smoke. Five men were charged with the murder but three were acquitted on the directions of the judge.
The only substantial evidence against the pair was from two witnesses who changed their stories during the investigation.
The jailed men had an appeal dismissed in 1992. Mr Kulasingham then went on hunger strike and, 56 days later, was close to death when the Home Office ordered an inquiry by Essex police that resulted in the case being sent back to the Court of Appeal.
The new hearing was told that among the fresh evidence uncovered was a pocket-book entry and statement, both made by Sgt Shafiq Mogul, suggesting that officers ill-treated the men, particularly Mr Kulasingham.
Mr Kulasingham complained after his arrest that police had assaulted him. Documents supporting his claim were not disclosed to defence lawyers.
Lord Justice McCowan said said no contemporaneous notes were made of initial interviews with the Crown witnesses, Indra Kumar and Muralee Arulgodiventhan.
Indra must have been a prime suspect for complicity in the murders, yet instead of being interviewed under caution he was taken into protective custody at a safe house.
Sgt Mogul's pocket book entry of a conversation with Mr Kulasingham was itself 'riddled with impropriety'.
The appeal judges said they could not be sure that, had the fresh material been available, the jury would have reached the same conclusion.
After being released, Mr Sivalingham said: 'It has been a nightmare and I want the police to be prosecuted. I came to this country for safety as a refugee from war in Sri Lanka and yet I have spent all those years behind bars.'
Jeremy Corbyn, the Labour MP for Islington North who campaigned for the two men, said: 'The police investigating the case knew that the immigration status of a number of witnesses was unclear and they used that to extort evidence which was used to condemn two innocent men.'
A spokesman from the Metropolitan Police said: 'We will study the judgment and will be discussing any likely action with the Crown Prosecution Service.'