The longest war in U.S. History was the War in Afghanistan which lasted from 2001 to 2021. The war was an international conflict triggered by the Taliban's attacks on the World Trade Center on September 11, 2001.