Castro was born out of wedlock at his father's farm on 13 August 1926.

In 1947, Castro joined the Party of the Cuban People (Partido Ortodoxo).

He married Mirta Díaz Balart, a student from a wealthy family, through whom he was exposed to the lifestyle of the Cuban elite. The relationship was a love match, disapproved of by both families, but Díaz Balart's father gave them tens of thousands of dollars, along with Batista, to spend on a three-month New York City honeymoon.

Castro volunteered to deliver a speech for the Movement on 13 November, exposing the government's secret deals with the gangs and identifying key members. Attracting the attention of the national press, the speech angered the gangs and Castro fled into hiding, first in the countryside and then in the United States.

Returning to Havana several weeks later after the speech, Castro lay low and focused on his university studies, graduating as a Doctor of Law in September 1950.

Castro gathered 165 revolutionaries for the mission, ordering his troops not to cause bloodshed unless they met armed resistance. The attack took place on 26 July 1953, but ran into trouble; 3 of the 16 cars that had set out from Santiago failed to get there. Reaching the barracks, the alarm was raised, with most of the rebels pinned down by machine gun fire. Four were killed before Castro ordered a retreat. The rebels suffered 6 fatalities and 15 other casualties, whilst the army suffered 19 dead and 27 wounded. Meanwhile, some rebels took over a civilian hospital; subsequently stormed by government soldiers, the rebels were rounded up, tortured and 22 were executed without trial.

Castro was sentenced on 16 October, during which he delivered a speech that would have been printed under the title of History Will Absolve Me. Castro was sent to 15 years' imprisonment in the hospital wing of the Model Prison (Presidio Modelo), a relatively comfortable and modern.

Castro's wife Mirta gained employment in the Ministry of the Interior, something he discovered through a radio announcement. Appalled, he raged that he would rather die "a thousand times" than "suffer impotently from such an insult". Both Fidel and Mirta initiated divorce proceedings, with Mirta taking custody of their son Fidelito; this angered Castro, who did not want his son growing up in a bourgeois environment.

In 1954, Batista's government held presidential elections, but no politician standing against him; the election was widely considered fraudulent. It had allowed some political opposition to be voiced, and Castro's supporters had agitated for an amnesty for the Moncada incident's perpetrators. Some politicians suggested an amnesty would be good publicity, and the Congress and Batista agreed. Backed by the US and major corporations, Batista believed Castro to be no threat, and on 15 May 1955, the prisoners were released.

After purchasing the decrepit yacht Granma, on 25 November 1956, Castro set sail from Tuxpan, Veracruz, with 81 armed revolutionaries.The 1,200-mile (1,900 km) crossing to Cuba was harsh, with food running low and many suffering seasickness. At some points, they had to bail water caused by a leak, and at another, a man fell overboard, delaying their journey.

The plan had been for the crossing to take 5 days, and on the Granma's scheduled day of arrival, 30 November, MR-26-7 members ("26th of July Movement") under Frank País led an armed uprising in Santiago and Manzanillo. However, the Granma's journey ultimately lasted 7 days, and with Castro and his men unable to provide reinforcements, País and his militants dispersed after two days of intermittent attacks.

The Granma ran aground in a mangrove swamp at Playa Las Coloradas, close to Los Cayuelos, on 2 December 1956.

Fearing Castro was a socialist, the U.S. instructed Cantillo to oust Batista. By this time the great majority of Cuban people had turned against the Batista regime. Ambassador to Cuba, E. T. Smith, who felt the whole CIA mission had become too close to the MR-26-7 movement, personally went to Batista and informed him that the US no longer would support him and felt he no longer could control the situation in Cuba. General Cantillo secretly agreed to a ceasefire with Castro, promising that Batista would be tried as a war criminal; however, Batista was warned, and fled into exile with over US$300,000,000 on 31 December 1958.

Heading toward Havana, he greeted cheering crowds at every town, giving press conferences and interviews. Castro reached Havana on 9 January 1959.

On 16 February 1959, Castro was sworn in as Prime Minister of Cuba.

In May 1959, Castro signed into law the First Agrarian Reform, setting a cap for landholdings to 993 acres per owner and prohibiting foreigners from obtaining Cuban land ownership.

Relations between Cuba and the U.S. were further strained following the explosion of a French vessel, the La Coubre, in Havana harbor in March 1960. The ship carried weapons purchased from Belgium, and the cause of the explosion was never determined, but Castro publicly insinuated that the U.S. government was guilty of sabotage.

In September 1960, Castro flew to New York City for the General Assembly of the United Nations. Staying at the Hotel Theresa in Harlem, he met with journalists and anti-establishment figures like Malcolm X. He also met Soviet Premier Nikita Khrushchev, with the two publicly condemning the poverty and racism faced by Americans in areas like Harlem. Relations between Castro and Khrushchev were warm; they led the applause to one another's speeches at the General Assembly.

In September 1960, they created the Committees for the Defense of the Revolution (CDR), a nationwide civilian organization which implemented neighborhood spying to detect counter-revolutionary activities as well as organizing health and education campaigns, becoming a conduit for public complaints.

On 13 October 1960, the U.S. prohibited the majority of exports to Cuba, initiating an economic embargo.

In retaliation, the National Institute for Agrarian Reform INRA took control of 383 private-run businesses on 14 October.

On 25 October a further 166 U.S. companies operating in Cuba had their premises seized and nationalized.

Despite the fear of a coupe, Castro garnered support in New York City. In on February 18, 1961, 400 people—mainly Cubans, Puerto Ricans, and college students—picketed in the rain outside of the United Nations rallying for Castro's anti-colonial values and his effort to reduce the United States' power over Cuba. The protesters held up signs that read, "Mr. Kennedy, Cuba is Not For Sale.", "Viva Fidel Castro!" and "Down With Yankee Imperialism!". Around 200 policemen were on the scene, but the protesters continued to chant slogans and throw pennies in support of Fidel Castro's socialist movement. Some Americans disagreed with President Kennedy's choice to ban trade with Cuba, and outwardly supported his nationalist revolutionary tactics.

On 15 April, CIA-supplied B-26s bombed three Cuban military airfields; the U.S. announced that the perpetrators were defecting Cuban air force pilots, but Castro exposed these claims as false flag misinformation.

The CIA and the Democratic Revolutionary Front had based a 1,400-strong army, Brigade 2506, in Nicaragua. On the night of 16 to 17 April, Brigade 2506 landed along Cuba's Bay of Pigs and engaged in a firefight with a local revolutionary militia .

Castro ordered Captain José Ramón Fernández to launch the counter-offensive, before taking personal control of it. After bombing the invaders' ships and bringing in reinforcements, Castro forced the Brigade to surrender on 20 April.

In May 1963, Castro visited the USSR at Khrushchev's personal invitation, touring 14 cities, addressing a Red Square rally, and being awarded both the Order of Lenin and an honorary doctorate from Moscow State University.

In January 1964, Castro returned to Moscow, officially to sign a new five-year sugar trade agreement, but also to discuss the ramifications of the assassination of John F. Kennedy. Castro was deeply concerned by the assassination, believing that a far right conspiracy was behind it but that the Cubans would be blamed.

In 1966 Castro staged a Tri-Continental Conference of Africa, Asia and Latin America in Havana, further establishing himself as a significant player on the world stage.

Castro publicly celebrated his administration's 10th anniversary in January 1969; in his celebratory speech he warned of sugar rations, reflecting the nation's economic problems.

Cuba's government underwent a restructuring along Soviet lines, claiming that this would further democratize and decentralize power away from Castro. Officially announcing Cuba's identity as a socialist state, the First National Congress of the Cuban Communist Party was held, and a new constitution adopted that abolished the position of President and Prime Minister. Castro remained the dominant figure in governance, taking the presidency of the newly created Council of State and Council of Ministers, making him both head of state and head of government.

In 1979, the Conference of the Non-Aligned Movement (NAM) was held in Havana, where Castro was selected as NAM president, a position he held until 1982.

Castro underwent surgery for intestinal bleeding, and on 31 July 2006, delegated his presidential duties to Raúl Castro.

That month, the Non-Aligned Movement held its 14th Summit in Havana, there agreeing to appoint Castro as the organization's president for a year's term.

In a February 2008 letter, Castro announced that he would not accept the positions of President of the Council of State and Commander in Chief at that month's National Assembly meetings, remarking, "It would betray my conscience to take up a responsibility that requires mobility and total devotion, that I am not in a physical condition to offer". On 24 February 2008, the National Assembly of People's Power unanimously voted Raúl as president. Describing his brother as "not substitutable", Raúl proposed that Fidel continue to be consulted on matters of great importance, a motion unanimously approved by the 597 National Assembly members.

On 7 August 2010, Castro gave his first speech to the National Assembly in four years, urging the U.S. not to take military actions against those nations and warning of a nuclear holocaust.

On 19 April 2011, Castro resigned from the Communist Party central committee, thus stepping down as party leader. Raúl was selected as his successor. Now without any official role in the country's government, he took on the role of an elder statesman.

Cuban state television announced that Castro had died on the night of 25 November 2016. The cause of death was not disclosed. His brother, President Raúl Castro, confirmed the news in a brief speech: "The commander in chief of the Cuban revolution died at 22:29 [EST] this evening.