Juan Carlos was born to Infante Juan, Count of Barcelona, and Princess María de las Mercedes of Bourbon-Two Sicilies in Rome, Italy, where his grandfather King Alfonso XIII of Spain and other members of the Spanish royal family lived in exile following the proclamation of the Second Spanish Republic in 1931.
He then joined the army, doing his officer training from 1955 to 1957 at the Military Academy of Zaragoza.
In 1957, Juan Carlos spent a year in the naval school at Marín, Pontevedra, and another in the Air Force school in San Javier in Murcia.
In 1960–61, he studied Law, International Political Economy and Public Finance at Complutense University. He then went to live in the Palace of Zarzuela and began carrying out official engagements.
Juan Carlos was married in Athens on 14 May 1962, to Princess Sophia of Greece and Denmark, daughter of King Paul of Greece, first in a Roman Catholic ceremony at the Church of St. Denis, followed by a Greek Orthodox ceremony at the Metropolitan Cathedral of Athens. She converted from her Greek Orthodox religion to Roman Catholicism.
Franco decided to skip a generation and name Juan de Borbón's son, Prince Juan Carlos, as his personal successor. Franco hoped the young prince could be groomed to take over the nation while still maintaining the ultraconservative and authoritarian nature of his regime. In 1969, Juan Carlos was officially designated heir-apparent and was given the new title of Prince of Spain (not the traditional Prince of Asturias). As a condition of being named heir-apparent, he was required to swear loyalty to Franco's Movimiento Nacional, which he did with little outward hesitation. His choice was ratified by the Spanish parliament on 22 July 1969.
During periods of Franco's temporary incapacity in 1974 and 1975, Juan Carlos was acting head of state. On 30 October 1975, Franco gave full control to Juan Carlos.
Franco died on 20 November, three weeks after giving full control to Juan.
On 22 November, two days after Franco's death, the Cortes Españolas proclaimed Juan Carlos King of Spain.
On 27 November, a Mass of the Holy Spirit was celebrated in the church of San Jerónimo el Real in Madrid to inaugurate his reign. He opted not to call himself Juan III or Carlos V, but Juan Carlos I.
Further legitimacy was restored to Juan Carlos's position on 14 May 1977, when his father (whom many monarchists had recognized as the legitimate, exiled King of Spain during the Franco era) formally renounced his claim to the throne and recognized his son as the sole head of the Spanish Royal House, transferring to him the historical heritage of the Spanish monarchy, thus making Juan Carlos both de facto and de jure king in the eyes of the traditional monarchists.
On 20 May 1977, the leader of the only recently legalized Spanish Socialist Workers' Party (PSOE), Felipe González, accompanied by Javier Solana, visited Juan Carlos in the Zarzuela Palace. The event represented a key endorsement of the monarchy from Spain's political left, who had been historically republican. Left-wing support for the monarchy grew when the Communist Party of Spain was legalized shortly thereafter, a move Juan Carlos had pressed for, despite enormous right-wing military opposition at that time, during the Cold War.
On 15 June 1977, Spain held its first post-Franco democratic elections.
In 1978, the government promulgated a new constitution that acknowledged Juan Carlos as rightful heir of the Spanish dynasty and king; specifically, Title II, Section 57 asserted Juan Carlos's right to the throne of Spain by dynastic succession in the Bourbon tradition, as "the legitimate heir of the historic dynasty" rather than as the designated successor of Franco. The Constitution was passed by the democratically elected Constituent Cortes, ratified by the people in a referendum (6 December) and then signed into law by the King before a solemn meeting of the Cortes.
There was an attempted military coup, known as 23-F, on 23 February 1981, when the Cortes were seized by members of the Guardia Civil in the parliamentary chamber. During the coup, the King, in the uniform of the Captain-General of the Spanish armed forces, gave a public television broadcast calling for unambiguous support for the legitimate democratic government. The broadcast is believed to have been a major factor in foiling the coup.
The victory of the PSOE in 1982 under González marked the effective end of the King's active involvement in Spanish politics. González would govern for 14 years, longer than any democratically elected Prime Minister. His administration helped consolidate Spanish democracy and thus maintained the stability of the nation.
The issue of the monarchy re-emerged on 28 September 2007 as photos of the king were burnt in public in Catalonia by small groups of protesters wanting the restoration of the Republic.
In April 2012, Juan Carlos faced criticism for making an elephant-hunting trip in Botswana. Spaniards found out about the trip only after the King injured himself and a special aircraft was sent to bring him home. Spanish officials stated that the expenses of the trip were not paid by taxpayers or by the palace, but by Mohamed Eyad Kayali, a businessman of Syrian origin. Cayo Lara Moya of the United Left party said the king's trip "demonstrated a lack of ethics and respect toward many people in this country who are suffering a lot" while Tomás Gómez of the Socialist party said Juan Carlos should choose between "public responsibilities or an abdication". In April 2012, Spain's unemployment was at 23 percent and nearly 50 percent for young workers. El País estimated the total cost of a hunting trip at 44,000 euros, about twice the average annual salary in Spain.
Spanish news media speculated about the King's future in early 2014, following public criticism over his taking an elephant hunting safari in Botswana and an embezzlement scandal involving his daughter Cristina, and her husband Inaki Urdangarin. The King's chief of staff in a briefing denied that the 'abdication option' was being considered. On the morning of 2 June 2014, Prime Minister Mariano Rajoy made a televised announcement that the King had told him of his intention to abdicate. Later, the King delivered a televised address and announced that he would abdicate the throne in favour of the Prince of Asturias. Royal officials described the King's choice as a personal decision which he had been contemplating since his 76th birthday at the start of the year. The King reportedly said, "No queremos que mi hijo se marchite esperando como el príncipe Carlos." As required by the Spanish constitution, any abdication would be settled by means of an organic law.
In June 2019, the former King announced his retirement from official duties.