The official said, on condition of anonymity, that the blast occurred in a parking lot near a commercial center in Antelias on the outskirts of Beirut on Thursday, AFP reported.
The two victims were identified as Ihsan Dia and Hassan Nassar.
Lebanese television said the victims were believed to have been carrying explosives inside their vehicle when the explosion occurred.
A car belonging to Lebanese judge Albert Serhal was in the area at the time of the incident but it was unclear whether he was targeted, according to the official.
The blast happened at around 11.30 local time and security forces quickly sealed the area and brought in bomb-sniffing dogs, reports say.
In July, a bomb blast in the southern city of Sidon wounded five French troops serving with the United Nations Interim Force in Lebanon