"The Government has the duty to take the necessary measures seeking compensation for material and moral damages caused by the United States" to the country and Iranians over the past 63 years, the text reads.
It cites "material or moral damage" caused by the US during the coup against nationalist leader Mohammad Mossadegh in 1953, in the Iran-Iraq war between 1980 and 1988, in the destruction of oil platforms in the Gulf and in espionage against the Islamic republic.
Parliament did not specify a sum, but Vice President Majid Ansari said during the debate that "Iranian courts have already ruled that the US pay $US50 billion ($68 billion) in damages for its hostile actions" towards the country.
The law was passed by the conservative-dominated outgoing parliament in response to a US Supreme Court decision last month.
On April 20, the US body ruled that Iran must hand nearly $US2 billion in frozen central bank assets to the survivors and relatives of those killed in attacks it has been accused of organising.
These attacks include the 1983 bombing of a US Marine barracks in Beirut and the 1996 Khobar Towers bombing in Saudi Arabia.
The ruling affects around 1,000 Americans.
On May 10, President Hassan Rouhani said Tehran was preparing international legal action to recover the nearly $US2 billion in frozen assets.
"We will not allow the United States to swallow this money so easily," he told a crowd of thousands in the south-eastern city of Kerman.
The Iranian funds are frozen in New York.
Iranian officials have complained that the United States is not doing enough to encourage investment in Iran, despite the landmark nuclear accord with world powers that resulted in sanctions being lifted.