Soldiers manning the army checkpoint saw the young man climb out of a car and throw a hand grenade which failed to explode, the official said. The soldiers warned the man not to move, but he ignored the orders and moved quickly toward them with his hands on his waist.
The man, wearing an explosive belt of 4.41 pounds of TNT and 2.2 pounds of metal balls, tried to blow himself up in an armored personnel carrier with the aim of killing as many soldiers as possible, the official told The Associated Press.
Troops opened fire and killed the man instantly, the official said, speaking on condition of anonymity because he was not authorized to talk to the media.
A military explosive expert removed the explosive belt the man was wearing, and an investigation is under way.
The would-be suicide bomber was identified as Mahmoud Yassin Ahmad, a 28-year-old Palestinian who lives in the Ein el-Hilweh camp.
The army checkpoint had previously been attacked by Palestinian militants from the teeming camp.
The army then sealed off the area.
Ein el-Hilweh, with a population of 70,000, is the largest of Lebanon's 12 Palestinian refugee camps. It is notorious for lawlessness and is frequently rocked by gunfights between armed groups jockeying for power. A number of fugitives live in the camp, which is under Palestinian jurisdiction and off limits to Lebanese authorities.
Earlier Saturday, a Lebanese soldier was killed in an explosion in the north of the country, the military said. They did not identify the cause of the blast.
Privately-owned Future TV reported that the blast, in the northern town of Abdeh, was caused by an explosive planted at an army position.
A military statement identified the victim as Osama Ahmed Hassan, 24.
It was not immediately clear whether the two incidents are linked.
Lebanon is recovering from sectarian clashes that have left 81 dead and ended with an Arab League-brokered political agreement between feuding factions and the election of the army commander as head of state.
Abdeh is near the devastated Palestinian refugee camp of Nahr el-Bared, where fighting between troops and al-Qaida-inspired Islamic militants erupted a year ago. Hundreds died before the army crushed the rebellion three months later.