Vieira was born in Bissau. Originally trained as an electrician, he joined the African Party for the Independence of Guinea and Cape Verde (PAIGC) of Amilcar Cabral in 1960 and soon became a key player in the country's guerrilla war against Portuguese colonial rule.
As the war intensified, he demonstrated a great deal of skill as a military leader and rapidly rose through its ranks. Vieira was known to his comrades as "Nino" and this remained his nom de guerre for the duration of the struggle.
Following regional council elections held in late 1972 in areas under PAIGC control, which led to the formation of a constituent assembly, Vieira was appointed president of the National People's Assembly. On 28 September 1978, he was appointed Prime Minister of Guinea-Bissau.
By 1980, economic conditions had deteriorated significantly leading to general dissatisfaction with the government. On 14 November 1980, Vieira toppled the government of Luís Cabral in a bloodless military coup, which led to the PAIGC in Cape Verde splitting away and forming a separate party. The constitution was suspended and a nine-member military Council of the Revolution, chaired by Vieira, was set up. In 1984, a new constitution was approved that returned the country to civilian rule.
Guinea-Bissau, like the rest of Sub-Saharan Africa moved toward multiparty democracy in the early 1990s. The ban on political parties was lifted in 1991 and elections were held in 1994. In the first round of the presidential election, held on 3 July 1994, Vieira received 46.20% of the vote against seven other candidates. He finished first, but failed to win the required majority, which led to a second round of voting on 7 August. He received 52.02% of the vote against 47.98% for Kumba Yalá, a former philosophy lecturer and candidate of the Social Renewal Party (PRS). International election observers considered both rounds generally free and fair. Vieira was sworn in as the first democratically elected President of Guinea-Bissau on 29 September 1994.
Vieira was re-elected for another four-year term as President of PAIGC in mid-May 1998 at a party congress, with 438 votes in favor, eight opposed, and four abstaining.
Vieira dismissed military chief of staff Ansumane Mané on 6 June 1998. Mané and his supporters in the military promptly rebelled, and the country descended into a civil war between forces loyal to Vieira and rebels loyal to Mané. A peace agreement was signed in November 1998, and a transitional government was formed in preparation for new elections in 1999. On November 27 1998, the National People's Assembly passed a motion demanding Vieira's resignation, with 69 deputies supporting the motion and none opposing it.
A renewed outbreak of fighting occurred in Bissau on 6 May 1999, and Vieira's forces surrendered on 7 May. He sought refuge in the Portuguese embassy and went into exile in Portugal in June. On 12 May, former Prime Minister Manuel Saturnino da Costa was named acting President of PAIGC, replacing Vieira. Vieira was expelled from PAIGC at a party congress in September 1999 for "treasonable offences, support and incitement to warfare, and practices incompatible with the statutes of the party".
After President Kumba Yalá was overthrown in September 2003 military coup, Vieira returned to Bissau from Portugal on 7 April 2005. Arriving in the city's main football stadium by helicopter, he was met by over 5,000 cheering supporters. Although Vieira's supporters had collected 30,000 signatures for a petition urging him to run for president, he did not immediately confirm his intention to do so, saying that he was returning "to re-establish [his] civic rights and to register to vote in the coming elections" and that he wanted to contribute to peace and stability. He also said that he had forgiven his enemies and that he hoped others would forgive him for any harm he had caused. On 16 April, it was announced that he intended to stand as a candidate in the June 2005 presidential election. Although many considered Vieira to be ineligible because he had been living in exile and because of legal charges against him pertaining to the 1985 killings of suspected coup plotters, he was cleared to stand in the election by the Supreme Court in May 2005, along with Yalá. The Court unanimously ruled in favor of his candidacy on the grounds that he had already ended his exile by returning in April and that no court records of the murder charges could be found. His old party, the PAIGC, backed former interim president Malam Bacai Sanhá as its candidate.
According to official results, Vieira came in second in the 19 June election with 28.87% of the vote, behind Malam Bacai Sanhá, and thus participated in the second round run-off. He officially defeated Sanhá in the run-off on 24 July with 52.35% of the vote and was sworn in as president on 1 October.
On October 28, 2005, Vieira announced the dissolution of the government headed by his rival Prime Minister Carlos Gomes Junior, citing the need to maintain stability; on November 2 he appointed his political ally Aristides Gomes to the position.
In March 2007, PAIGC formed a three-party alliance with the Party for Social Renewal (PRS) and the United Social Democratic Party (PUSD), and the three parties sought to form a new government. This led to a successful no-confidence vote against Aristides Gomes and his resignation late in the month; on 9 April, the choice of the three parties for the position of Prime Minister, Martinho Ndafa Kabi, was appointed as Prime Minister by Vieira. In Kabi's three-party government, Interior Minister Baciro Dabo was considered to be the only close ally of Vieira who was included. Later, after PAIGC withdrew from the three-party alliance to protest Kabi's actions, Vieira dissolved the National People's Assembly and appointed Carlos Correia to replace Kabi as Prime Minister on August 5 2008.