Hannan was hanged at Kashimpur Jail in Gazipur along with his accomplice Sharif Shahedul alias Bipul at 10:01 pm (local time), Home Minister Asaduzzaman Khan said.
His associate Delwar Hossain Ripon was executed in Sylhet jail, the minister added.
Gazipur Superintendent of Police Harun Ur Rashid said the autopsies of Hannan and Bipul have been completed and their bodies will be sent to their village homes amid tight security.
President Abdul Hamid had rejected their mercy petitions this week.
Earlier, the authorities beefed up security in and around the Kashimpur jail. The family members of Hannan -- his wife, two daughters and elder brother -- met him in the jail in the morning.
Ripon's family members also met him at the Sylhet jail.
On March 19, the Supreme Court reconfirmed an earlier verdict of itself endorsing death penalty of Hannan and the two others for the 2004 attack on the then UK envoy.
The then Bangladeshi born British High Commissioner Anwar Chowdhury narrowly escaped the grenade attack at a shrine in northeastern Sylhet that killed three people, all policemen, and injured 70 others. Anwar sustained minor injuries.
The HuJI operatives carried out the attack at the shrine of saint Hazrat Shahjalal in Sylhet, also the birthplace of Chowdhury, as he went to visit there 18 days into his new assignment in Dhaka.
A speedy trial tribunal originally tried the case and delivered its verdict on December 23, 2008, sentencing to death HuJI leaders Sharif Shahedul Alam and Delwar Hossain alongside Hannan.
Hannan and seven other kingpins and operatives of Huji were earlier sentenced to death by another court in Dhaka for a deadly 2001 bomb attack that killed 10 people during Bengali New Year celebrations at a public park.
HuJI was formed in 1992 by Bangladeshis who took part in the Afghan war against the Soviet forces in Afghanistan.
The US has designated HuJi as a foreign terrorist organization and "specially designated global terrorist" while Indian officials suspected the outfit's links in the Jaipur serial bombings and several other blasts.
Bangladesh has witnessed a spate of attacks on secular activists, foreigners and religious minorities since 2013.
Representative image
Bangladesh is India's second best friend
'Butcher of Mirpur' will be executed: Bangladesh SC
After 30 years, Bangladesh hangs Mujib's killers
Bangladesh hangs top Jamaat-e-Islami leader for 1971 war crimes
Bangladesh hangs Jamaat-e-Islami chief for 1971 war crimes