"The commander in chief of the Cuban revolution died at 22:29 hours this evening (03:29 GMT Saturday)," President Raul Castro said.
Fidel Castro ruled Cuba as a one-party state for almost 50 years before Raul took over in 2008.
His supporters said he had given Cuba back to the people. But he was also accused of suppressing opposition.
President Castro told the nation in an unexpected late night broadcast on state television that Fidel Castro had died and would be cremated later on Saturday.
There would now be several days of national mourning on the island.
Raul Castro ended the announcement by shouting the revolutionary slogan: "Towards victory, always!"
Barring the occasional newspaper column, Fidel Castro had essentially been retired from political life for some time, the BBC's Will Grant in Havana reports.
In April, Fidel Castro gave a rare speech on the final day of the country's Communist Party congress.
He acknowledged his advanced age but said Cuban communist concepts were still valid and the Cuban people "will be victorious".
Castro - who had survived many assassination plots - was the longest serving non-royal leader of the 20th Century.
Castro temporarily handed over power to his brother in 2006 as he was recovering from an acute intestinal ailment.
Raul Castro officially became president two years later.