The move came as Rome reiterated its willingness to lead a multinational force to tackle the growing jihadist threat in Libya, a former Italian colony.
In total, about 100 Italians were being evacuated by ship from the north African state, foreign ministry sources said.
The ministry said the embassy - the last Western mission to remain open in Libya - has "suspended its activities because of the worsening security situation".
But it said in a statement that "essential services" would continue.
Rome had on Friday warned its nationals against travelling to Libya and urged those already there to leave as the jihadists gain ground.
However, hundreds of Italians, working in the Libyan oil and gas sector, remain in the country.
Defence Minister Roberta Pinotti said in an interview published Sunday that Italy was ready to lead a coalition from Europe and north African states to battle against the advance of jihadists in Libya.
"We have been discussing this for months but now it has become urgent," Pinotti told Il Messaggero newspaper, adding that Italy was willing to send in thousands of men.
Since dictator Muammar Qaddafi was toppled and killed in a Nato-backed revolt in 2011, Libya has been plagued by conflict among rival forces battling for control of key cities and the country's oil riches.
'Risk is imminent'
Taking advantage of the chaos, Islamic State militants who have already grabbed swathes of land in Syria and Iraq have claimed a string of deadly attacks.
The latest targeted a luxury hotel in Tripoli on January 27th, when nine people were killed, five of them foreigners.
"The risk is imminent, we cannot wait any longer. Italy has national defence needs and cannot have a caliphate ruling across the shores from us," Pinotti said.
She said the risk of jihadists arriving in Italy on boats carrying immigrants from Libya "could not be ruled out".
Thousands of migrants escaping war or famine make the perilous crossing across the Mediterranean from north Africa to Europe, but large numbers perish.
In the latest tragedy last week, more than 300 died when their overcrowded rubber dinghies collapsed and sank in stormy seas.
The Vatican's representative in Tripoli, Bishop Giovanni Martinelli told the La Stampa newspaper that he wanted to stay in Libya for the moment in solidarity with 300 Filipino Catholics still there.
Italian Prime Minister Matteo Renzi had told public television on Saturday that Rome was committed to intervening in Libya, and called for a stronger UN mission.
"We have told Europe and the international community that we have to stop sleeping," he said.
"We need a stronger UN mission. Italy is ready, as part of a UN mission to fulfill its role to defend an idea of freedom in the Mediterranean region."