US President Barack Obama said Megrahi's release, eight years into his life sentence, was "a mistake".
He said his administration had told the Libyan government that Megrahi, who has terminal cancer, should not receive a hero's welcome and should be placed under house arrest.
Megrahi was convicted of murder in January 2001 at a trial held under Scottish law in the Netherlands but has always denied being behind the bombing.
Scottish Justice Secretary Kenny MacAskill announced the release order on Thursday morning, saying the prisoner probably had about three months to live.
Mr Miliband said images of Megrahi being welcomed in the Libyan capital were very disturbing for the families of those who died in the bombing.
Christian Fraser BBC News correspondent, in Libya
Despite the jubilant scenes in the capital, we haven't had any sense of triumphalism from government ministers. And we've still not had a statement from Colonel Gaddafi himself.
I think the last thing the Libyans want in the run up to the 40th anniversary of the revolution, on 1 September, is this international condemnation.
There's no further news of al-Megrahi himself. It's a very quiet day in Tripoli - the first day of Ramadan. The streets are deserted, there's not much news in the media.
We are told he might be taken south to a town in the desert to meet Col Gaddafi - presumably to thank him for all the lobbying he has done on his behalf.
And we now have it on a second source that he is actually a distant relative of Col Gaddafi, which might explain why the colonel has taken such a personal interest.
"Obviously the sight of a mass murderer getting a hero's welcome in Tripoli is deeply upsetting, deeply distressing," he told the BBC.
The fact Megrahi's victims had been shown no compassion was "not a reason for us to deny compassion to him and his family in his final days", he said.
Mr Miliband said the decision to release Megrahi had been a choice for the Scottish justice secretary alone. Libya's response would be closely scrutinised, he added.
"It's very important that Libya knows that how the Libyan government handles itself in the next few days will be very significant in the way the world views Libya's re-entry into the civilised community of nations," Mr Miliband said.
In a country where movement is carefully restricted, the fact that Libya allowed supporters on to the runway to greet Megrahi in Tripoli clearly signals the Libyans were determined to salute his freedom, the BBC's Christian Fraser reports from Tripoli.
But Friday saw no sign of that triumphalism from government ministers and Col Gadaffi has still to give his reaction to the release, he says.
However Megrahi is treated in Libya in the short time he is believed to have left to live, he will go to the grave a convicted murderer, our correspondent adds.
Some major British oil and gas companies, bidding for highly competitive contracts with the country, could benefit from improved relations between Libya and the UK following Megrahi's release, our correspondent says.
However, the British Foreign Office said on Friday it was reviewing whether a royal visit by the Duke of York to Libya, scheduled for September, should now go ahead.
This would be Prince Andrew's third trip to Libya in his role as Britain's special representative for trade and investment.
Hundreds of people turned out to meet Megrahi's plane as it landed in Tripoli, many waving flags.
Megrahi, who had changed from the tracksuit he wore to leave Greenock prison in Scotland into a dark suit, was met by Col Gaddafi's son on arrival.
Seif al-Islam Gaddafi thanked both the Scottish and British governments for their "brave stance" although the British Government has insisted the decision to release Megrahi was a purely Scottish affair.
"I would like to express my deep gratitude to the Scottish government for taking this brave decision and for taking into account the special humanitarian circumstances," the younger Gaddafi said in a statement.
"I would also like to thank our friends in the British government who played an important part in bringing about this happy ending, and I will say that the Libyan people will not forget this brave stance taken by the British and Scottish governments..."
There was a "considerable amount of new evidence" to show Megrahi was innocent, he added, without giving details.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.