The car exploded close to Al-Hawari cemetery, killing two soldiers of Libya's internationally recognised government and wounding three, army spokesman Munzer al-Khartuch told AFP.
The cemetery is around 10 kilometres from the centre of Benghazi, Libya's second city.
IS said one of its militants blew up his explosives-laden vehicle in the middle of a group of soldiers, killing as many as 50 and destroying 15 vehicles.
Government forces have clashed with militants in the area since yesterday, when a military official said seven soldiers were killed near a cement factory.