The Global War on Terrorism begins as a result of the September 11 attacks. The U.S. invasion of Afghanistan initiates with an air assault and covert operations on the ground.

The War in Afghanistan was an armed conflict in Afghanistan from 2001 to 2021. It began when an international military coalition led by the United States launched an invasion of Afghanistan, subsequently toppling the Taliban-ruled Islamic Emirate and establishing the internationally recognized Islamic Republic three years later. The 20-year-long conflict ultimately ended with the 2021 Taliban offensive, which overthrew the Islamic Republic and subsequently re-established the Islamic Emirate. It was the longest war in the military history of the United States, surpassing the length of the Vietnam War (19551975) by approximately six months.

Following the September 11 attacks, American president George W. Bush demanded that the Taliban, an Afghan Islamist group that had established a de facto state over most of Afghanistan, immediately extradite Osama bin Laden to the United States. Bin Laden was wanted for masterminding the attacks, among other previous charges of terrorism, and had been granted asylum by the Taliban in Afghanistan, where he continued to freely operate; the Taliban's refusal to comply with American extradition demands for bin Laden led to the United States' declaration of Operation Enduring Freedom as part of the earlier-declared Global War on Terrorism. Shortly after the invasion of Afghanistan, the Taliban and their alliesnamely bin Laden's al-Qaedawere mostly defeated and expelled from major population centers across the country by American-led forces in support of the Northern Alliance, an anti-Taliban Afghan military front. However, the United States failed to kill or capture bin Laden in the Battle of Tora Bora, after which he relocated to neighboring Pakistan. Despite bin Laden's exit from the country, the American-led coalition of over 40 countries (including all of NATO) remained in Afghanistan, forming a security missionsanctioned by the United Nations and officially known as the International Security Assistance Force (ISAF)with the goal of consolidating a new democratic authority in the country that would prevent the return to power of the Taliban and al-Qaeda. At the Bonn Conference, new Afghan interim authorities elected Hamid Karzai to head the Afghan Interim Administration, and an international rebuilding effort was also launched across the entire country.

By 2003, the Taliban had reorganized under their founder, Mullah Omar, and began a widespread insurgency against the new Afghan government as well as against the American-led coalition. Insurgents from the Taliban and other Islamist groups waged asymmetric warfare with guerrilla tactics in the countryside and launched suicide attacks against urban targetsalso prominent were "green-on-blue attacks" carried out by Afghan soldiers against international coalition forces, and reprisal attacks against perceived Afghan collaborators. By 2007, fighting between the two sides had escalated to a point where large parts of Afghanistan had been retaken by the Taliban, resulting in a massive ISAF response that increased troops for counter-insurgency operations with a "clear and hold" strategy for villages and towns; the coalition response reached its peak in 2011, when roughly 140,000 foreign troops were operating under the ISAF command across Afghanistan.Following a covert American military operation that resulted in the killing of Osama bin Laden in the Pakistani city of Abbottabad in May 2011, NATO leaders commenced planning for an exit strategy from Afghanistan, as the goal for the original casus belli had been achieved. On 28 December 2014, NATO formally ended ISAF combat operations in Afghanistan and officially transferred full security responsibility to the Afghan government. Unable to eliminate the Taliban through military means, coalition forces (and separately the government of Afghan president Ashraf Ghani) turned to diplomacy to end the conflict. These efforts culminated in the Doha Agreement between the United States and the Taliban in February 2020, which stipulated the withdrawal of all American troops from Afghanistan by April 2021. In exchange for the American withdrawal, the Taliban pledged to prevent any militant group from utilizing Afghan sovereign territory to stage attacks against the United States and its allies. However, the Afghan government was not a party to the deal and rejected its terms regarding the release of prisoners.The target date for the American withdrawal was later extended to 31 August 2021; the Taliban, after the original deadline of April 2021 had expired, and coinciding with the troop withdrawal, launched a broad offensive throughout the summer, which resulted in their successful capture of most of Afghanistan, including the capital city of Kabul, which was taken on 15 August 2021. On the same day, the last president of the Islamic Republic, Ashraf Ghani, fled the country; the Taliban declared victory and the war was formally brought to a close. The re-establishment of Taliban rule across Afghanistan was confirmed by the United States, and on 30 August, the last American military aircraft departed from Afghanistan, ending the protracted American-led military presence in the country.According to the Costs of War Project, the war killed approximately 176,000 people in Afghanistan: 46,319 civilians, 69,095 military and police personnel, and at least 52,893 opposition fighters. According to the United Nations, after the 2001 invasion, more than 5.7 million former refugees returned to Afghanistan. However, with the return to power of the Taliban in August 2021, 2.6 million Afghans remained refugees, mostly in Pakistan and in Iran, while another 4 million Afghans remained internally displaced within the country.

The Global War on Terrorism (GWOT), popularly known as the war on terror, is the term that refers to an ongoing international military campaign launched by the United States government following the September 11 attacks. The targets of the campaign are primarily Islamist groups located throughout the world, with the most prominent groups being al-Qaeda, as well as the Islamic State and their various franchise groups.The naming of the campaign uses a metaphor of war to refer to a variety of actions that do not constitute a specific war as traditionally defined. 43rd President of the United States George W. Bush first used the term "war on terrorism" on 16 September 2001, and then "war on terror" a few days later in a formal speech to Congress. In the latter speech, President Bush stated, "Our enemy is a radical network of terrorists and every government that supports them." The term was originally used with a particular focus on countries associated with al-Qaeda. The term was immediately criticized by people such as Richard B. Myers, Chairman of the Joint Chiefs of Staff, and more nuanced terms subsequently came to be used by the Bush administration to publicly define the international campaign led by the United States. While it was never used as a formal designation of U.S. operations in internal government documentation, a Global War on Terrorism Service Medal was issued.

U.S. president Barack Obama, whose administration sought to avoid use of the term since taking office, announced on 23 May 2013 that the Global War on Terror was over, saying the military and intelligence agencies will not wage war against a tactic but will instead focus on a specific group of networks determined to destroy the U.S. On 28 December 2014, the Obama administration (which preferred to use the term Overseas Contingency Operation) announced the end of the combat role of the U.S.-led mission in Afghanistan; however, the U.S. continued to play a major role in the War in Afghanistan, and in 2017, U.S. President Donald Trump expanded the American military presence in Afghanistan. The rise of the Islamic State of Iraq and the Levant (ISIL) led to the global Operation Inherent Resolve, and an international campaign to destroy ISIL.

Criticism of the war on terror has focused on its morality, efficiency, and cost. According to a 2021 study conducted by the Watson Institute for International and Public Affairs, the several post-9/11 wars participated in by the United States in its war against terror have caused the displacement, conservatively calculated, of 38 million people in Afghanistan, Pakistan, Iraq, Libya, Syria, Yemen, Somalia, and the Philippines; 26.7 million people have returned home following displacement. The study estimated these wars caused the deaths of 897,000 to 929,000 people, including over 364,000 civilians, and cost $8 trillion.The notion of a "War on Terror" was contentious, with critics charging that it has been used to reduce civil liberties and infringe upon human rights, such as controversial actions by the U.S. including surveillance, torture, and extraordinary rendition, and drone strikes that resulted in the deaths of suspected terrorists as well as civilians. Many of these actions were supported by other countries, including the 54 countries that were involved with

CIA black sites, or those that helped with drone strikes. Critics accuse participating governments of using the "War on Terror" to repress minorities or sideline domestic opponents, and have criticized negative impacts to health and the environment, resulting from the "War on Terror". Critics assert that the term "war" is not appropriate in this context (much like the term "war on drugs") since terror is not an identifiable enemy and it is unlikely that international terrorism can be brought to an end by military means.