The attacker struck as guests gathered to mark the end of the Muslim holy festival of Eid al-Adha, and the force of the blast damaged parts of the house and grounds.
Blood stains could be seen marking the building, witnesses said.
"People were coming to exchange Eid greetings with him when a man came and blew himself up," Farooq Khan, the MP's relative, said.
Spin Zada, a doctor at a local government hospital, confirmed that the bodies of Khan and the bomber were brought to the hospital.
The attack that killed Khan occurred in a village that was a former headquarters of Mullah Fazlullah, the leader of the Pakistani Taliban.
It came as Taliban fighters continue a wave of bombings avenging a military offensive against them.
The army launched the offensive in Swat in late April and says it has cleared most of the area, but it still faces pockets of resistance.
Pakistan is under growing US pressure to eliminate al-Qaeda-linked fighters on its soil, who are known to slip over the border into Afghanistan and attack Nato and US troops stationed there.
The military has said that more than 2,000 fighters have died in the offensive in Swat valley, about 120 km (80 miles) northwest of Islamabad, but figures are impossible to confirm as access to the region is limited.