"European countries must guarantee that despite the USA pullout from the JCPOA, the interests of the Iranian nation will be preserved", Mohammad Javad Zarif said, using the official name of the agreement, according to Iran's Mehr news site.
"If the remaining five countries continue to abide by the agreement, Iran will remain in the deal despite the will of America", he continued, according to Reuters.
Under the deal signed in Vienna with six world powers - the US, UK, France, Germany, Russia, China and the European Union - Iran scaled back its uranium enrichment programme and promised not to pursue nuclear weapons in exchange for the lifting of economic sanctions.
Iranian President Hassan Rouhani similarly said that the Islamic Republic would stay in the deal if the European countries, along with Russian Federation and China, continued to abide by it.
China was closely involved in negotiating the agreement as one of the five permanent members of the United Nations Security Council and has always been a close Iranian economic partner, buying about a third of Iran's oil shipments.
"We hope that with this visit to China and other countries we will be able to construct a clear future design for the comprehensive agreement", Mohammad Javad Zarif told reporters after talks in Beijing with his Chinese counterpart Wang Yi.
He will visit Beijing followed by Moscow and Brussels, a spokesman said, holding meetings with all of the remaining parties to the 2015 agreement.
Mohammad Javad Zarif and senior Chinese officials hailed the "strategic partnership" between their countries.
Prior to leaving Iran, Zarif published a government statement via Twitter criticising Trump's "extremist administration" for abandoning "an accord recognised as a victory of diplomacy by the global community".
"Iran's interests in important areas and issues relevant to the JCPOA, like oil, gas, and petrochemicals sales, as well as banking relations should be clearly and explicitly defined and guaranteed", Rouhani said. "We are certain that today China is by our side". Trump called the deal unfair and doubted that it would limit the nuclear ambitions of Tehran.
Meanwhile, European diplomats in Tehran fumed that Trump's decision to withdraw from the nuclear deal could undermine years of patient work to restore commercial and diplomatic ties with the Islamic Republic.
Media captionWhat is the Iran nuclear deal?
That is part of a flurry of diplomatic activity following Trump's unilateral withdrawal from what he called "a frightful, one-sided deal", a move accompanied by the threat of penalties against any foreign firms doing business in Iran.