"The European Union has made the most demands on Iran after USA withdrawal from the nuclear deal, urging us to stay committed to the global agreement", he added.
An Iranian spokesman said Zarif will also visit Moscow and Brussels to hold meetings during the current trip.
China was one of the six powers - with the United States, Russia, France, the UK and Germany - that signed the historic pact, which saw sanctions lifted in return for the commitment by Tehran not to acquire nuclear weapons.
Zarif is now on a tour of the countries that are the parties to the agreement on the Joint Comprehensive Plan of Action (JCPOA) to hold consultations to salvage the deal.
China, like the European Union, says it wants to maintain the deal but it has also been preparing to take advantage of Mr Trump's decision to pull out of it.
Iran has claimed its nuclear program is for civilian purposes and denies supporting extremists in the region.
Trump directed his administration to "immediately begin the process of re-imposing sanctions" related to the deal, a White House statement said.
The Iranian nuclear deal is a result of multilateral efforts contributing to the protection of the worldwide non-proliferation regime, and supporting peace and stability in the Middle East, Wang added.
McCain says he opposes Trump's Central Intelligence Agency nominee
Imagine the meltdown that's going to happen when the first woman president is a Republican-and it will be a Republican woman. Haspel seemed completely comfortable with what was being done to the prisoners".
According to the semi-official ISNA news agency, Iranian Foreign Minister said in Beijing that he will discuss Iran's decision to stay in deal with Chinese counterpart Wang Yi.
Before leaving, Zarif published a government statement on his Twitter page, slamming Trump's "extremist administration" for abandoning "an accord recognised as a victory of diplomacy by the global community".
Iran has threatened to resume "industrial scale" uranium enrichment "without any restrictions" if it does not get guarantees that the trade ties which have been established with Europe since the deal was signed will be maintained.
Trump hit back on Saturday evening, tweeted that the accord had failed to contain Iran's militarism. "They will never abandon the United States for us", said housewife Poormoslem at a protest rally against Trump on Friday.
A number of voices in Iran have suggested the deal is unlikely to survive.
Iran's Supreme Leader Ayatollah Ali Khamenei has called the U.S. withdrawal "impudent" and "worthless".
Shortly after Trump's announcement about the USA withdrawal from the JCPOA, President Hassan Rouhani said Tehran would stay in the deal with other signatories if its interests are guaranteed.
"Our economic relations with Iran are in progress and the two sides have made long strides in other political, security and many others areas".