Isis said in a statement on Twitter that one of its “security detachments targeted the headquarters of Mellitah Oil and Gas with a car bomb in the Dhahra district in downtown Tripoli”.
At least one unidentified person was hurt in the explosion on Monday a few metres (yards) away from the offices of the oil firm, according to a security official in the militia-held capital.
Islamist extremists have exploited the turmoil in Libya since the fall of veteran leader Moamer Kadhafi in 2011 to establish a foothold in the energy-rich North African country.
Isis militants in June took over the coastal city of Sirte, 450 kilometres (280 miles) to the east of Tripoli.
Over the past few months, the group has claimed several attacks in the Libyan capital, mostly against embassies.
Isis did not say why it had targeted Mellitah Oil and Gas, which is owned equally by Eni and the Tripoli-based National Oil Corporation (Noc).
Its offices sit on the same street as the shuttered embassies of Saudi Arabia and the Netherlands as well as a branch of the Al-Jumhurriya state bank and a post office.
Most embassies in Tripoli have been closed because of the unrest. In a statement on Monday, Noc said there were no casualties among Mellitah's staff and only minor damage to the side of the building housing its offices.
“This incident will not affect the operations of the company,” it said. Nearby buildings including the bank were also damaged.
Libya has two rival governments and several armed groups vying for control of the country and its oil wealth.
After fleeing Tripoli in September 2014, Libya's internationally recognized government and parliament now operate out of the country's east.
The Fajr Libya (Libya Dawn) coalition has established its own government and parliament in Tripoli.