In a televised address on Wednesday night, Tanzania vice-president Samia Suluhu Hassan said that Magufuli had died of heart complications.
Hassan said that Magufuli was hospitalised on March 6 at the Jakaya Kikwete Cardiac Institute and died at Mzena State Hospital in Dar es Salaam.
She also announced that the country would get into a 14-day period of mourning as arrangements for the burial are made.
During this period, all flags in Tanzania will fly at half-mast, Hassan announced.
This comes after weeks of speculation on his whereabouts with the suspicion that he had been hospitalised for Covid-19.
Magufuli was born on October 29, 1959 in Chato, Tanzania and has been in office since 2015 as the fifth president.
He has previously served as a deputy minister and minister in previous administrations in Tanzania.
Magufuli was serving his second term that was to run until 2025 after controversially winning the Presidential election in 2020.
In its final results, the NEC said the president took 84 per cent of the vote, while opposition candidate Tundu Lissu received 13 per cent.
Source: The Star