John Atta Mills died on Tuesday at a military hospital, according to Information Minister Fritz Baffour. He was 68.
A statement from President's office said: "It is with a heavy heart...that we announce the sudden and untimely death of the President of the Republic of Ghana."
Chief of Staff of the Presidency Henry Martey Newman said that the 68-year-old President died at 37 Military Hospital in Accra after being rushed there when his health deteriorated.
Newman gave no details about the cause of Atta Mills' death.
Mills, 68, was inaugurated in January 2009. He returned home on June 25 from the US where he had undergone gone a medical check-up.
Mills ran three times for president before being elected in the closest vote in the country's history on a platform vowing to reform the West African country.
Information Minister Baffour also declined to elaborate. "Yes, I can confirm (his death), but I can't say more," he said.
The President celebrated his 68th birthday on Saturday. Atta Mills was elected in a 2008 runoff vote and was to run for a second term in December. He campaigned on a platform of change, arguing that the western African country's growth had not been felt in people's wallets.
Atta Mills even put up posters of himself standing next to a photoshopped cutout of US President Barack Obama in an effort to emphasise that the Ghanaian stood for change.
The 2008 election was the third time that Atta Mills had run for president.
He spent much of his career teaching at the University of Ghana. He earned a doctorate from London's School of Oriental and African Studies before becoming a Fulbright scholar at Stanford University in Palo Alto, California.