The bomber targeted a crowded rally held by a Pashtun nationalist party in Timergara, Lower Dir.
Investigators suspect it was co-ordinated with the Peshawar raid, in which attackers tossed grenades into the consulate compound.
There were no reported US casualties and it is not clear if the US building suffered any damage.
Police said it began when four heavily armed men in two cars tried to reach the consulate, which is in a heavily fortified area.
Peshawar police chief Liaquat Ali Khan told the Associated Press news agency the militants detonated their first vehicle at a checkpoint about 20 metres (65ft) from the entrance.
He said the driver of the other vehicle blew it up at another security barrier some 15 metres from the American mission.
That blast killed two militants wearing suicide vests who were walking ahead of the vehicle, he added.
Pakistani soldiers were immediately deployed on the main Khyber Road, where the explosions went off.
White House spokesman Robert Gibbs said the US response was one of "great concern", adding: "We strongly condemn the violence."
US Secretary of State Hillary Clinton said in a statement she was "outraged and deeply saddened" by the attack.
M Ilyas Khan, BBC News, Islamabad
Monday's attack in Peshawar appears to be similar to recent gun-and-bomb raids in Lahore and Rawalpindi.
These have been co-ordinated assaults, with several gunmen moving in alongside suicide bombers to force their way into a facility - this time the "prized" US consulate.
The Pakistani Taliban were apparently aiming for a feat to match the one last December in Khost, Afghanistan, in which several American CIA officials were killed.
Another reason could be to try to ease military pressure on militants in Orakzai tribal district, where the Pakistani security forces launched a major operation last week.
America's presence in Afghanistan and US drone strikes on militant targets in Pakistan's tribal areas make the US a top target for the Taliban.
"The assault is part of a wave of violence perpetrated by brutal extremists who seek to undermine Pakistan's democracy and sow fear and discord," she said.
Taliban spokesman Azam Tariq said his group had carried out the raid in retaliation for air raids by unmanned US aircraft.
"We accept the attacks on the American consulate," he told AFP news agency by telephone. "This is revenge for drone attacks.
"We will carry out more such attacks. We will target any place where there are Americans."
The BBC's Shoaib Hasan in Islamabad says this is the first attack on US interests in Pakistan in four years.
In 2006, a US diplomat was killed by a suicide car bomber near the US consulate in Karachi, days before a visit to Pakistan by then US President George W Bush.
As well as an Islamist insurgency that has killed many hundreds of people in recent years, nuclear-armed Pakistan is plagued by political bickering.
ATTACKS ON US TARGETS
Feb 2010: Three US military trainers die in bomb near Lower Dir school
Aug 2008: Top US diplomat evades Peshawar gun attack
Mar 2006: Suicide bomb kills US diplomat near same consulate
Feb 2003: Gunmen kill two policemen outside same consulate
June 2002: 12 Pakistanis die in bomb at Karachi US consulate
In a move which could help ease decision-making, President Asif Ali Zardari urged MPs on Monday to back reforms that will see him relinquish his sweeping powers.
Constitutional amendments, long demanded by the opposition, are expected to pass this week, making him more of a titular head of state, while empowering the prime minister and parliament.
In an annual address to MPs on Monday, Mr Zardari was cheered as he vowed there would be no surrender to the insurgents.
Peshawar, which is on the edge of Pakistan's tribal areas, has been frequently targeted by Islamist militants.
Analysts said Monday's attacks appeared to be in response to a major security operation launched last week in the Orakzai tribal region near Peshawar.
We asked for your reaction to this story. Please find a selection of your comments below.
The Khyber Road was closed for public transport two hours before the explosion took place as I was coming back to home from Peshawar University, so it seems that Pakistan intelligence knew about the attack.
I am visiting Peshawar on business and was about 1km away from the blast. The chaos and destruction here was indescribable. The only thoughts in most educated people's minds are: 'Why does the world not recognise that all these Taliban type attacks are fuelled by Saudi-type Wahabbi line of thinking?'. Until the West recognises Saudi Arabia and its radical type of Islam as the source of 'Islamic terrorism', the world will never be at peace.
Arif-ul Haque, Islamabad
The US Consulate has been stationed in Peshawar for the last 30 Years, but common Peshawar people still had to travel 180km to Islamabad to get a Visa. The world should understand that we the Pashtun of Peshawar and NWFP province are fighting against terror and cleaning up the supposed enemies of America which the USA created to fight the Russians in 1979. We are victims of double prejudice as we are considered as friends of the same terrorists who are killing us, although the local population have taken arms against the Taliban in NWFP and FATA to fight them voluntarily. This prejudice was the reason this consulate was closed to offering us local Pashtun people visas and travel rights to the USA.
The US has to decrease its presence in Pakistan which is causing civilian lives to be lost. The consulates should be moved outside the city because they have blocked the main entrance to the city, forcing people to have to take the long route.
Zubair Afridi, Peshawar
I wish all these coward fanatics could be eliminated in one go. Peshawar is a beautiful place with a proud and welcoming people - unfortunately destroyed by these idiots who have nothing to do with the religion of Islam. These people are brain-washed for political and personal gains.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.