Friday's attack occurred in the Fizaghat neighbourhood of Swat's Mingora district outside a school building requisitioned by troops, a security official said.
"Two security force personnel embraced martyrdom in the suicide attack," another senior official told the AFP news agency.
"A suicide bomber rammed his explosive-filled car into the wall of the check post," he said.
Three other soldiers were slightly wounded, he said.
Separately, a remote-controlled bomb struck a Pakistani military convoy, killing a civilian and wounding two others at a village near Mingora.
Descent into chaos
Swat, once a popular destination for Pakistani and foreign tourists, was the country's only ski resort.
Today it has descended into chaos, with battles between armed fighters and security forces.
The Pakistani military is battling fighters loyal to Maulana Fazlullah, a pro-Taliban official, who has demanded a stricter enforcement of Islamic laws.
More than 1,500 Pakistani troops have been killed at the hands of pro-Taliban fighters since 2002.