Security sources said the attackers drove up to the compound, which houses both the embassy and ambassador's residence, in the Siahia neighborhood in Western Tripoli before fleeing immediately.
Residents in the area said it was the ambassador's residence which was hit the early morning assault. He was believed to be out of the country, and no injuries were reported.
There has been a spate of bombings in recent months in Libya which have mainly targeted Western diplomats and missions, though the Tunisian consulate has also been attacked.
"I heard a loud explosion so I went outside. I then saw a hole in the building," resident Khaled al-Zintani said.
Interior Ministry Spokesman Rami Kaal has said there were no injuries in the attack. "An investigation is under way," he said without giving further details.
Voice of Russia, Reuters