He was convicted in 2001 of murdering 270 people by blowing up Pan-Am flight 103 over Lockerbie 13 years earlier, but has always denied having any part in the atrocity.
He was born in the Libyan capital, Tripoli, on April 1, 1952 and his first language is Arabic.
However, he studied in the US and also visited Britain "four or five times" during the 1970s when he is said to have spent nine months studying in Cardiff.
He married his wife Aisha in the 1980s and the couple later lived in her father's modest house in the suburbs of Tripoli.
He described himself as the former director of Libya's Centre for Strategic Studies, a role which - the FBI claimed - gave him cover to act as an intelligence officer for the Libyan Intelligence Services (JSO).
His role as an intelligence officer was accepted by the three judges who tried him, but Tam Dalyell, the former Labour MP, who believes the Libyan is innocent, has always claimed he was merely a "sanctions buster" for the Libyan government.
It was Megrahi's appointment as the chief of security for Libyan Arab Airlines (LAA) which, according to prosecutors, allowed him to carry out the bombing.
It had an office in Malta, where Libyans were able to move freely. From there, Megrahi was able to use as many as four false passports to travel to Zurich, where the timing device for the bomb was made, and to Tripoli.
Scraps of clothes wrapped around the bomb led investigators to Mary's House, a shop in the Maltese port of Sliema, and, eventually, to Megrahi.
When suspicion fell on him he spent eight years living under armed guard - relying on a small LAA pension and work as a teacher - before he was handed over for trial.
Two of Megrahi's children, his son Khaled and his daughter Ghada, watched as he gave evidence at Camp Zeist in the Netherlands.
In television interviews shown to the court, a quietly-spoken Megrahi told reporters, "I'm a quiet man. I never had any problem with anybody", and said he felt sorry for the people of Lockerbie.
After his sentence he was sent to Glasgow's fearsome Barlinnie prison, where he was segregated in an area dubbed "Gaddafi's Cafe", where there was said to be a "sitting room" and a kitchen where Halal food was prepared.
Nelson Mandela, who had helped broker the deal which allowed the trial to take place, visited him there and called for him to be moved to a Muslim country to avoid harassment from other prisoners.
He was transferred in 2005 HMP Greenock where he has since mixed with other "lifers".
His wife and children lived in a house in Glasgow provided by the Libyan government to allow them to visit him in jail before returning home to Tripoli earlier this year.