Gusmão was born in Manatuto, in what was then Portuguese Timor, to parents of mixed Portuguese-Timorese ancestry, both of whom were school teachers. He attended a Jesuit high school just outside Dili. After leaving high-school for financial reasons at the age of fifteen, he held a variety of unskilled jobs, while continuing his education at night school. In 1965, at the age of 19, he met Emilia Batista, who was later to become his wife. His nickname, "Xanana", was taken from the name of the American rock and roll band Sha Na Na, who in turn were named after a lyric from a doo-wop song of 1957 by the Silhouettes.
In 1966, Gusmão obtained a position with the public service, which allowed him to continue his education. This was interrupted in 1968 when Gusmão was recruited by the Portuguese Army for national service. He served for three years, rising to the rank of corporal. During this time, he married Emilia Batista, with whom he had a son Eugenio, and a daughter Zenilda. He has since divorced Emilia, and in 2000, he married Australian Kirsty Sword, with whom he had three sons: Alexandre, Kay Olok and Daniel. In 1971, Gusmão completed his national service, his son was born, and he became involved with a nationalist organisation headed by José Ramos-Horta. For the next three years he was actively involved in peaceful protests directed at the colonial system.
It was in 1974 that a coup in Portugal resulted in the beginning of decolonisation for Portuguese Timor, and shortly afterwards the Governor Mário Lemos Pires announced plans to grant the colony independence. Plans were drawn up to hold general elections with a view to independence in 1978. During most of 1975 a bitter internal struggle occurred between two rival factions in Portuguese Timor. Gusmão became deeply involved with the Fretilin faction, and as a result he was arrested and imprisoned by the rival faction the Timorese Democratic Union (UDT) in mid-1975. Taking advantage of the internal disorder, and with an eye to absorbing the colony, Indonesia immediately began a campaign of destabilisation, and frequent raids into Portuguese Timor were staged from Indonesian West Timor. By late 1975 the Fretilin faction had gained control of Portuguese Timor and Gusmão was released from prison. He was given the position of Press Secretary within the Fretilin organisation. On 28 November 1975, Fretilin declared the independence of Portuguese Timor as "The Democratic Republic of East Timor", and Gusmão was responsible for filming the ceremony. Nine days later, Indonesia invaded East Timor. At the time Gusmão was visiting friends outside of Dili and he witnessed the invasion from the hills. For the next few days he searched for his family.
After the appointment of the "Provisional Government of East Timor" by Indonesia, Gusmão became heavily involved in resistance activities. Gusmão was largely responsible for the level of organisation that evolved in the resistance, which ultimately led to its success. The early days featured Gusmão walking from village to village to obtain support and recruits. But after Fretilin suffered some major setbacks in the early 1980s, including a failed 1984 coup attempt against Gusmão led by four senior Falintil officers, including Mauk Moruk. Gusmão left Fretilin and supported various centrist coalitions, eventually becoming a leading opponent of Fretilin. By the mid-1980s, he was a major leader. During the early 1990s, Gusmão became deeply involved in diplomacy and media management, and was instrumental in alerting the world to the massacre in Dili that occurred in Santa Cruz on 12 November 1991. Gusmão was interviewed by many major media channels and obtained worldwide attention.
As a result of his high profile, Gusmão became a prime target of the Indonesian government. A campaign for his capture was finally successful in November 1992. In May 1993, Gusmão was tried, convicted and sentenced to life imprisonment by the Indonesian government. He was found guilty under Article 108 of the Indonesian Penal Code (rebellion), Law no. 12 of 1951 (illegal possession of firearms) and Article 106 (attempting to separate part of the territory of Indonesia). He spoke in his own defence and he was appointed with defence lawyers before the commencement of his trial. The sentence was commuted to 20 years by Indonesian President Suharto in August 1993. Although not released until late 1999, Gusmão successfully led the resistance from within prison with the help of Kristy Sword. By the time of his release, he was regularly visited by United Nations representatives, and dignitaries such as Nelson Mandela.
On 30 August 1999, a referendum was held in East Timor and an overwhelming majority voted for independence. The Indonesian military commenced a campaign of terror as a result, with terrible consequences. Although the Indonesian government denied ordering this offensive, they were widely condemned for failing to prevent it. As a result of overwhelming diplomatic pressure from the United Nations, promoted by Portugal since the late 1970s and also by the United States and Australia in the 1990s, a UN-sanctioned, Australian-led international peace-keeping force (INTERFET) entered East Timor, and Gusmão was finally released. Upon his return to his native East Timor, he began a campaign of reconciliation and rebuilding.
Gusmão was appointed to a senior role in the UN administration that governed East Timor until 20 May 2002. During this time he continually campaigned for unity and peace within East Timor, and was generally regarded as the de facto leader of the emerging nation. Elections were held in late 2001 and Gusmão, endorsed by nine parties but not by Fretilin, ran as an independent and was comfortably elected leader. As a result, he became the first President of East Timor when it became formally independent on 20 May 2002. Gusmão has published an autobiography with selected writings entitled To Resist Is to Win. He is the main narrator of the film A Hero's Journey/Where the Sun Rises, a 2006 documentary about him and East Timor. According to director Grace Phan, it's an "intimate insight into the personal transformation" of the man who helped shape and liberate East Timor.
On 21 June 2006, Gusmão called for Prime Minister Mari Alkatiri to resign or else he would, as allegations that Alkatiri had ordered a hit squad to threaten and kill his political opponents led to a large backlash. Senior members of the Fretilin party met on 25 June to discuss Alkatiri's future as the Prime Minister, amidst a protest involving thousands of people calling for Alkatiri to resign instead of Gusmão. Despite receiving a vote of confidence from his party, Alkatiri resigned on 26 June 2006 to end the uncertainty. In announcing this he said, "I declare I am ready to resign my position as prime minister of the government...so as to avoid the resignation of His Excellency the President of the Republic [Xanana Gusmão]." The 'hit squad' accusations against Alkatiri were subsequently rejected by a UN Commission, which also criticised Gusmão for making inflammatory statements during the crisis.
Gusmão declined to run for another term in the April 2007 presidential election. In March 2007 he said that he would lead the new National Congress for Timorese Reconstruction (CNRT) into the parliamentary election planned to be held later in the year, and said that he would be willing to become prime minister if his party won the election. He was succeeded as President by José Ramos-Horta on 20 May 2007. The CNRT placed second in the June 2007 parliamentary election, behind Fretilin, taking 24.10% of the vote and 18 seats. He won a seat in parliament as the first name on the CNRT's candidate list. The CNRT allied with other parties to form a coalition that would hold a majority of seats in parliament. After weeks of dispute between this coalition and Fretilin over who should form the government, Ramos-Horta announced on 6 August that the CNRT-led coalition would form the government and that Gusmão would become Prime Minister on 8 August. Gusmão was sworn in at the presidential palace in Dili on 8 August.
On 11 February 2008, a motorcade containing Gusmão came under gunfire one hour after President José Ramos-Horta was shot in the stomach. Gusmão's residence was also occupied by rebels. According to the Associated Press, the incidents raised the possibility of a coup attempt; they have also described as possible assassination attempts and kidnap attempts.
In 1999, Gusmão was awarded the Sakharov Prize for Freedom of Thought.
In July 2000 Gusmão was appointed as a Honorary Companion of the New Zealand Order of Merit (CNZM) for the furtherance of New Zealand–East Timor relations.
In 2000, he was awarded the Sydney Peace Prize for being "Courageous and principled leader for the independence of the East Timorese people".
Also in 2000, he won the first Gwangju Prize for Human Rights, created to honour "individuals, groups or institutions in Korea and abroad that have contributed in promoting and advancing human rights, democracy and peace through their work."
In 2002, he was awarded the North-South Prize by the Council of Europe.
Gusmão is an Eminent Member of the Sergio Vieira de Mello Foundation. Grand-Cross of the Order of Liberty, Portugal (June 9, 1993).
Honorary Knight Grand Cross of the Most Distinguished Order of Saint Michael and Saint George, United Kingdom in 2003.
Grand Collar of the Order of Prince Henry, Portugal (November 13, 2007)