"An RPG (rocket-propelled grenade) was fired on the building which sustained minor damage," said ministry spokesman Rami Said, adding that no one was hurt in the incident.
The attack on the United Arab Emirates embassy in Tripoli's Al-Siyahia area occurred at around 5:30 am (0330 GMT), Said was quoted as saying by Libya's Lana news agency. He said the UAE ambassador was currently out of Libya.
Witnesses said the attackers, who came in a car, fled after firing the RPG at the complex which houses the embassy and the ambassador's residence.
On Tuesday, a rocket struck an apartment block in the centre of the Libyan capital in an attack that caused no casualties.
The building is located in a residential area of Tripoli between the Corinthia hotel and a tower that houses the British, Canadian and Maltese embassies, as well as foreign companies.