Dewji had driven himself to the hotel gym before being seized by two masked gunmen who fired their guns into the air before driving away.
Clearly strained and appearing exhausted‚ he thanked the "Tanzanian authorities‚ including the police‚ who worked for my return". It thanks police for working for his "safe return". I thank all my fellow Tanzanians, and everyone around the world for their prayers, ' he said in the tweeted message.
Dewji's family had offered a reward of 1 billion Tanzania shillings ($440,000) for information leading to his release.
Speaking at a news conference, Inspector-General of Police, Simon Sirro, said Mr Dewji had told them the suspects spoke in English and "broken Swahili" and that a vehicle they had travelled on had foreign plates.
Mr Dewji, 43-year-old CEO of the METL Group family conglomerate, was kidnapped by unknown men on October 11 while he was going for his early morning workout in Tanzania's commercial capital Dar es Salaam.
"He told us that the kidnappers wanted money but were very afraid‚ even though they were armed". Dewji was abducted outside a luxury hotel in Tanzania.
He also gave his captors contacts for his parents but they feared that they would be caught if they approached them, Sirro said, adding that they had finally chose to give up. "He asked them several times how much they wanted but they gave no figure‚" he said.
"We now know their network, we know which country the plans were made", he added, without giving details.
Mambosasa said Dewji could not see the abductors because he was tied by his legs and hands while his face was covered.
He also served as a member of parliament for the ruling Chama cha Mapinduzi party from 2005-2015.
Mohammed Dewji is also the main shareholder in Tanzania's Simba FC football club.
In 2016 Forbes magazine put Dewji's wealth at $1.5 billion (£1,147,492,500), making him Africa's youngest billionaire.