The scathing slogans appeared just days after Iran's supreme leader Ayatollah Ali Khamenei said such insults should not be taken personally by US or Israeli citizens.
The 6-mile-long downtown Enghelab, or Revolution Street, in Tehran was decorated with huge balloons as loudspeakers blared out revolutionary and nationalist songs to encourage people to join the rallies.
In a speech at Tehran's Azadi square, President Hassan Rouhani dismissed USA efforts to isolate Iran, saying US sanctions could not break the Islamic Republic.
In the capital's Azadi Square, President Hassan Rouhani dismissed USA efforts to isolate Tehran while touting his country's military might.
Tensions between Washington and Tehran are high after the U.S. withdrew from an global nuclear deal aimed at curbing Iran's nuclear ambitions, and re-imposed sanctions that have hurt the Iranian economy.
The United States and its Arab allies have viewed Iran with great suspicion since the Islamic Revolution swept the Shah from power in 1979, fearing Khomeini's radical ideology would inspire Islamic militants across the Middle East.
An Iranian girl poses with a potrait of the country's Supreme Leader Ali Khamenei with signs reading "Down with USA" and "Down with Israel" during a ceremony celebrating the 40th anniversary of Islamic Revolution by the capital Tehran's Azadi (Freedom) tower in the square of the same name on February 11, 2019. Tehran denies the charge, insisting its satellite launches and rocket tests do not have a military component. The regime in Iran has produced only #40YearsofFailure.
In January, Mr Rouhani said Iran was facing its worst economic crisis since the Shah was toppled.
Gen. Qassem Soleimani, the head of Iran's elite Quds Force, attended a rally in the southern city of Kerman.
In Tehran, 27-year-old medical student Hossein Hosseinpour, walked with his wife and their 18-month son Amir Ali. "I see a bright future for him and our nation", Hosseinpour said.
"On the revolution's 40th anniversary we are at the top for scientific achievements like nanotechnology or accurate missiles", he said. "I don't think you'll have many more anniversaries to enjoy".
Ayatollah Khamenei recently said when they chant "death to America" they really just mean death to President Donald Trump and his Cabinet.
"40 Years of Failure to accept that Iranians will never return to submission".
Earlier, Trump's chief foreign policy advisor John Bolton issued a similar statement, tweeting that "it's been 40 yrs of failure".
Last year, Bolton told a meeting of Iranian exiles that "before 2019, we here. will celebrate in Iran".