Talks led by Yemen's defence minister had been under way to secure the release of Juergen Chrobog and his family, who were seized by tribesmen on Wednesday during a trip to eastern Shabwa province from the southern port city of Aden.
"The five hostages were handed over to Yemeni authorities and are expected to leave Shabwa soon," the official told Reuters. A private plane was expected to fly the Chrobogs back to Aden later in the day.
In Berlin, the German Foreign Ministry declined to comment on the report that Chrobog had been released.
The kidnappers were demanding that the Yemeni government free five tribesmen jailed on criminal charges, including murder.
"Authorities have promised the tribesmen to resolve the issues linked to their demands within the next few weeks," said the official, who was close to the talks.
Armed tribal groups in Yemen, where central government control is often weak, seize tourists frequently, but they are usually freed unharmed after negotiations.
Chrobog, 65, was Germany's ambassador to the United States from 1995 to 2001. In 2003, he was the top diplomat dealing with Europeans abducted in the Sahara desert and was able to secure the release of 14 hostages, including nine Germans.