The Asian giant and the Middle East's foremost Shiite power aim to build economic ties worth up to USD 600 billion within the next 10 years, Rouhani announced.
The two leaders oversaw the signing of 17 agreements in areas including politics, the economy, security and cooperation on peaceful nuclear energy.
"With the Chinese president's visit to Tehran and our agreements, a new chapter has begun in Tehran-Beijing relations," Rouhani said in a televised speech, flanked by Xi.
"Iran is China's major partner in the Middle East and the two countries have chosen to boost bilateral relations," IRNA quoted Xi as saying.
Beijing is Tehran's top customer for oil exports, which in recent years were hit by US and EU sanctions over Tehran's nuclear programme.
Trade between the two countries was worth USD 52 billion in 2014.
According to Iranian media, more than a third of Iran's foreign trade is carried out with China.
He was scheduled to meet later Saturday with Iran's supreme leader Ayatollah Ali Khamenei.
Xi's tour, his first of the Middle East as Chinese president, has also taken him to Saudi Arabia and Egypt.
Riyadh and a number of Sunni Arab allies broke diplomatic ties with Iran this month after protesters angry over the execution of a prominent Shiite cleric ransacked Saudi diplomatic missions in Iran.
In Cairo, Xi offered USD 55 billion in loans and investments to the Middle East, a region where China wants to strengthen its economic presence.
