U.S. Secretary of State Hillary Clinton and Pakistan President Asif Ali Zardari were among dignitaries attending the ceremony in an ornate hall in Karzai's sprawling Kabul palace.
Outside, the capital was all but a ghost town, with police shutting down streets and ordering citizens to stay home.
In the south, where the Taliban-led insurgency is at its deadliest since the war began eight years ago, a suicide bomber wearing a vest packed with explosives killed 10 civilians in a crowded market and a car bomb killed two U.S. soldiers.
Karzai, 51, called for reconciliation with enemies and proposed a "loya jirga," a traditional grand assembly, which under Afghanistan's constitution can take precedence over all government institutions, including the presidency itself.