Witnesses at the scene reported flames rising from inside the compound and at least three US soldiers on the roof of the main building inside embassy.
It was not clear what caused the fire at the reception area near the parking lot of the compound.
A man on a loudspeaker urged the mob not to enter the compound, saying: "The message was delivered."
The US ambassador to Iraq and other staff were evacuated from the embassy.
Earlier, hundreds of protesters gathered outside the embassy to protest US air attacks that killed 25 fighters from an Iran-backed Shia group in Iraq this week.
Shouting "Down, Down USA!" the crowd hurled water bottles and smashed security cameras outside the embassy grounds.
The US military carried out the strikes on Sunday against the Iranian-backed Kataib Hezbollah, calling it retaliation for last week's killing of an American contractor in a rocket attack on an Iraqi military base that it blamed on the group.
The protesters raised flags of the powerful paramilitary group Hashd al-Shaabi (Popular Mobilization Forces), of which Kataib Hezbollah is part, and several people climbed over the wall of the embassy and chanted "death to America" and "no, no America", witnesses said.
Tuesday's attempted embassy storming took place after mourners held funerals for fighters killed in a Baghdad neighbourhood, after which they marched on to the heavily fortified Green Zone and kept walking till they reached the embassy.
Security guards were seen retreating to the inside of the embassy. Protesters also were seen hanging yellow flags belonging to the Kataib Hezbollah on the walls of the embassy.
Speaking from the scene in Baghdad, Al Jazeera's Simona Foltyn said there was no indication of an armed confrontation so far.
"This entire funeral procession, consisting mostly of PMF members and their followers, has entered through these gates without any resistance whatsoever from the Iraqi security forces that are supposed to guard the Green Zone," she said, speaking from outside the US Embassy.
"We've seen in the past when anti-government protesters were able to enter the Green Zone but I don't believe we've seen such a large number of people come this close to the US Embassy," she continued, calling this a "significant development".
"It remains to be seen how the authorities will react and more importantly, how the US will react," Foltyn added.
Vows of revenge
The US attack - the largest one targeting an Iraqi state-sanctioned group in recent years - and the calls for retaliation represent a new escalation in the proxy war between the US and Iran playing out in the Middle East.
The US military said "precision defensive strikes" were conducted against five sites belonging to Kataib Hezbollah, which is a separate force from the Lebanese group Hezbollah, in Iraq and Syria.
Source: Al Jazeera and agencies