Mike Harvey was kidnapped in capital city Sanaa in February.
A Foreign Office spokesman said: "We are pleased to confirm that British hostage Mike Harvey held in Yemen since February has been released safely.
"He is being supported by staff at the British Embassy and will be reunited with his family soon."
Harvey, a teacher, was abducted on his way from an educational institute on February 12.
A Foreign Office spokesman said he was released after the Yemeni government engaged with tribal intermediaries.
"We are grateful to the government for their efforts and support," he added.
Harvey's family are aware he has been freed but have asked for privacy.
His abduction was the third to take place in Yemen in only two weeks. On February 2, another Briton working with an oil services company was kidnapped in Sanaa. Two days earlier, a German citizen was also kidnapped.