US Central Command announced the blockade would involve all Iranian ports, beginning on Monday at 10am EDT (midnight AEST) and would be "enforced impartially against vessels of all nations".
The command said it would still allow ships travelling between non-Iranian ports to transit the strait, a step down from the president's earlier threat to blockade the entire strait.
The blockade announcement halted the limited ship traffic that resumed in the strait since a ceasefire, said an early report from Lloyd's List intelligence.
Marine trackers say more than 40 commercial ships have crossed since the start of the ceasefire, down from roughly 100 to 135 vessel passages per day before the war.
Oil prices rose in early market trading after the blockade announcement. The price of US crude rose eight per cent to $104.24 a barrel, and Brent crude oil, the international standard, rose seven per cent to $102.29.
Brent crude cost roughly $70 per barrel before the war in late February.
A chorus of top-ranking Iranian officials threatened retaliation. Mohsen Rezaei, a military adviser and a former Revolutionary Guard Commander, wrote on social media platform X the nation's armed forces had "major untouched levers" to counter a Hormuz blockade.
He said Iran would not be coerced by "tweets and imaginary plans".
Iranian parliament speaker, Mohammad Bagher Qalibaf, who led Iran's side in the talks, addressed Trump in a statement on his return to Iran.
"If you fight, we will fight," Qalibaf said, also posting a map of Washington-area petrol prices on X.
"Enjoy the current pump figures. With the so-called 'blockade', Soon you'll be nostalgic for $4–$5 gas," he wrote.
Iran's Revolutionary Guard later said the strait remained under Iran's "full control" and was open for non-military vessels, but military ones would get a "forceful response", two semi-official Iranian news agencies reported.
During the 21-hour weekend talks in Pakistan, the US military said two destroyers had transited the strait ahead of mine-clearing work, a first since the war began. Iran denied it.
The face-to-face talks that ended on Sunday were the highest-level negotiations between the longtime rivals since the 1979 Islamic Revolution.
Trump said Tehran's nuclear ambitions were the core reason for the talks' failure. In comments to Fox News, he again threatened to strike civilian infrastructure if Iran didn't give up its nuclear program.
"In one half of a day they wouldn't have one bridge standing, they wouldn't have one electric generating plant standing, and they're back in the stone ages," Trump said.
Vice President JD Vance, who led the US side in the talks, said Washington would need "an affirmative commitment that they will not seek a nuclear weapon".
Iranian negotiators could not agree to all US "red lines", said a US official who spoke on condition of anonymity.
Those red lines included Iran never obtaining a nuclear weapon, ending uranium enrichment, dismantling major enrichment facilities and allowing retrieval of its highly enriched uranium, along with opening the Strait of Hormuz and ending funding for Hamas, Hezbollah and Houthi rebels.
Iranian officials said talks fell apart over two or three key issues, blaming what they called US overreach.
Pakistani Foreign Minister Ishaq Dar said his country will try to facilitate a new dialogue in the coming days. Iran said it was open to continuing dialogue, state-run IRNA news agency reported.