The soldiers were killed at a border post in the Mohmand tribal region late on Tuesday.
"The militants launched a cross-border attack into Afghanistan. At least 10 of our soldiers were killed in a counter-offensive by forces in Afghanistan," said a senior Pakistani security official who declined to be identified.
The official did not say if the forces battling militants on the Afghan side were from NATO or a separate US command.
He also did not say how the Pakistani soldiers were killed, but residents in the area said it was believed to have been by an air strike.
A government official said late on Tuesday a pilotless U.S. drone was suspected to have fired a missile into the area.
Government officials in the area said about 40 soldiers were deployed at the post in Suran Dara, about 40 km (30 miles) northwest of Ghalanai, Mohmand's main town.
"We don't have any information about the remaining soldiers," an official said.