He died on Wednesday from heart complications at a hospital in Dar es Salaam, Samia Suluhu Hassan said in an announcement on state television.
He has not been seen in public for more than two weeks, and rumors have been circulating about his health.
Opposition politicians said earlier this week that he had contracted Covid-19, but this has not been confirmed.
Since then, the arrests in Tanzania started over missing president rumors.
Mr. Magufuli was declared president on his 56th birthday in October 2015.
“It is with deep regret that I inform you that today… we lost our brave leader, the president of the Republic of Tanzania, John Pombe Magufuli,” Vice-President Hassan said.
She said there would be 14 days of national mourning and flags would fly at half-mast.
Mr. Magufuli was declared president on his 56th birthday in October 2015. He was elected for a second term following a disputed poll last year.
He was one of Africa’s most prominent coronavirus skeptics and called for prayers and herbal-infused steam therapy to counter the coronavirus.
Tanzania has not published details of its coronavirus cases since the month of May, and the government has refused to purchase vaccines for its citizens to be vaccinated.
Mr. Magufuli was last seen in public on 27 February, but Prime Minister Kassim Majaliwa insisted last week that the president was “healthy and working hard”.
His Last Tweet
Nimesikitishwa na kifo cha Prof. Benno Ndulu (Ex-Governor BOT). Pole kwa familia na wafiwa wote. Nitamkumbuka kwa ushauri wake wa kuimarisha uchumi wa nchi yetu hususani mageuzi ktk sekta ya fedha. Alikuwa mchapakazi na mnyenyekevu. Mungu aiweke roho yake mahali pema peponi,Amina
— Dr John Magufuli (@MagufuliJP) February 22, 2021
This breaking news story is being updated and more details will be published shortly. Please refresh the page for the fullest version.