Borut Pahor was born on 2 November 1963 in Postojna. He has a degree in political science, with a focus on international relations. In 1987, he won the Prešeren and Zore Awards from the then Faculty of Sociology, Political Science and Journalism, University of Ljubljana for his graduate thesis.

He started his professional career in 1990 as a delegate in the then Assembly of the Republic of Slovenia, where he also chaired the Youth Committee and the International Affairs Committee.

In 1992, he was elected as a deputy to the National Assembly. During his 1992–1996 term, he served on the Assembly's Commission for EU Affairs, the Commission for the Supervision of Security and Intelligence Services, and the Committee on Defence; he also led Slovenia's delegation at the Parliamentary Assembly of the Council of Europe.

In 1993, he became vice-leader of the United List of Social Democrats (ZLSD).

He was re-elected as a deputy in the National Assembly in 1996. To April 1997, he served as its Vice-President and was a member of the Committee on International Relations, the Constitutional Commission and the Committee on Defence, the Chairman of the National Assembly's delegation to the Parliamentary Assembly of the Council of Europe, and a member of the Executive Committee of the Inter-Parliamentary Union.

At the 3rd ZDSL congress in March 1997 in Ljubljana, he was elected as the new party leader.

In the parliamentary election of 2000, he was elected as a deputy and became President of the National Assembly.

In June 2001, he was re-elected leader of the ZLSD at the party's congress in Koper.

In June 2004, before the end of his term in the Slovenian National Assembly, he was elected via a preference vote as a Member of the European Parliament. There, he was a member of the Socialist-Democrat Group, the Committee on Budgetary Control and the Committee on Constitutional Affairs, and was the Vice-Chair of the Delegation to the EU-Croatia Joint Parliamentary Committee.

At his initiative, the party was renamed the Social Democrats (SD) at the ZLSD's 5th congress in April 2005 held in Ljubljana.

The 2008 parliamentary elections brought a relative victory to the Social Democrats. Acting on the basis of the election result and having consulted deputy groups, the President of the Republic of Slovenia, Danilo Türk, appointed Borut Pahor formateur, which was confirmed on 7 November by a ballot in the National Assembly. A new government was sworn in on 21 November 2008 and met for its opening session on 22 November 2008.

The government coalition comprised the Social Democrats (SD), the Zares Party – New Politics (Zares), the Democratic Party of Pensioners of Slovenia (DeSUS) and the Liberal Democracy of Slovenia (LDS).

Borut Pahor ended his term as Prime Minister early after having lost a confidence vote. On 20 September 2011, the National Assembly of the Republic of Slovenia rejected all ministerial candidates in a package vote.

In the parliamentary elections of 2011, he stood as a candidate of the SD list in Nova Gorica and was elected as a deputy.

On 2 June 2012, he announced that he would run in presidential elections that autumn. In the second ballot, taking place on 2 December 2012, he was supported by 67.37 per cent of voters, which made him the fourth elected President of the Republic of Slovenia.

Borut Pahor and his partner, the lawyer Tanja Pečar, have a son Luka. Borut Pahor is fluent in English and Italian, and has a working knowledge of French. In his free time, he particularly enjoys being active in sport.