"A special operation led by Cameroonian armed forces along with security services of friendly nations succeeded this night (Tuesday) in freeing Nitsch Eberhard Robert, a German citizen abducted in Nigeria in July 2014 by the Boko Haram sect," the Cameroon presidency said in a statement.
A spokesman for the German foreign ministry confirmed the man's release, adding that he was now in Cameroon's capital Yaounde.
No further details were immediately available about the hostage or the raid itself, including where it took place.
The release was announced a day after Boko Haram's leader Abubakar Shekau mocked African leaders who were meeting in Niger to try to forge a united front against the Islamists.
"African kings… I challenge you to attack me now. I am ready."
Boko Haram — which has been waging a brutal insurgency in Nigeria since 2009 — previously abducted foreigners in Nigeria and Cameroon, but all have since been released.
However, more than 200 schoolgirls abducted by the militants in April last year in one of the most shocking acts of their insurgency are still missing.
As news of the German's rescue emerged, the African Union announced it has asked the Security Council to approve a mandate for a regional force and a fund to help finance it.
"Boko Haram is a threat not only to Nigeria and the region, but also to the continent as a whole," AU head Nkosazana Dlamini-Zuma said in a statement.
Nigeria's army has come under fire repeatedly for failing to crush the militants, whose insurgency has left 13,000 people dead and forced 1.5 million from their homes.
Boko Haram has also been stepping up attacks in Nigeria and neighbouring Cameroon, where it abducted dozens of people Sunday.
Niger said Wednesday the headquarters of the regional African force set up to fight Boko Haram will now be transferred to Chad after its base in the Nigerian border town of Baga was overrun earlier this month by the Islamist militants.
Regional efforts hamstrung
Chad is seen as having the most capable military in the region and at the weekend sent a convoy of troops and 400 military vehicles into neighbouring Cameroon to battle Boko Haram.
Two Cameroonian soldiers were wounded in heavy clashes on Tuesday with Boko Haram in the far north of Cameroon, which borders Nigeria.
"We managed to repel the enemy," a Cameroonian military commander told AFP on condition of anonymity. "We saw signs that made us think Boko Haram lost men."
Regional efforts to fight Boko Haram have been hampered by Nigeria's reticence, with Abuja looking suspiciously on any foreign military intervention on its soil.
"Nigeria feels it can take care of the problem itself, but (Boko Haram) is no longer just impacting Nigeria, it's an issue for the whole region," said an African diplomat based in Ethiopia's capital.
Nigeria and its neighbours held talks this week in Niger's capital Niamey on speeding up the creation of the force to fight the militants.
Anger against the militants is growing in Cameroon, with protesters hitting the capital's streets Wednesday with signs saying "Beat it Boko Haram," and "I am Kolofata," in reference to town that has suffered repeated attacks from Boko Haram.
The group's leader Shekau claimed responsibility for the assault on Baga in a video posted on Tuesday which is thought to have killed hundreds and is considered the militants' deadliest attack.
In his 35-minute message Shekau said: "We will not stop. This is not much. You'll see."