The Iranian News Agency, IRNA, said the protesters threw stones and inflammable material at the building which they managed to enter for a very short time before being kicked out by police who took control of the building immediately.
The demonstrators, screaming "death to Denmark" and "death to America," were protesting against cartoons carried in the Danish media depicting Prophet Mohammed as a terrorist with a bomb in his turban.
The cartoons touched off uproar and similar protests throughout the Arab and Muslim world and Danish missions were burned in Damascus and Beirut last week in a move largely seen by the Europeans as orchestrated by the Syrian regime.
Tuesday's attempt to storm the embassy in Tehran is the second in as many days.
On Monday, protesters demonstrated outside the Danish and Austrian embassies but were kept at a distance by a large number of security forces and anti-riot police.
The 12 slandering cartoons first published by a Danish newspaper Sept. 30, 2005 were carried later in Norwegian and French newspapers.