Crown Prince Mohammed bin Salman met China's President Xi Jinping on Friday as Saudi Arabia signed 35 economic deals worth $28 billion and an agreement for Aramco develop a refinery in the country.
During the meeting, Mr Xi urged a joint China-Saudi effort to counter extremism and terror.
"China is a good friend and partner to Saudi Arabia," Mr Xi said. "The special nature of our bilateral relationship reflects the efforts you have made."
Mr Xi has made China stepping up its interests in the Middle East a key foreign policy objective - including a state visit to the UAE last year.
Prince Mohammed said Saudi Arabia's relations with China dated back "a very long time in the past".
"In the hundreds, even thousands, of years, the interactions between the sides have been friendly. Over such a long period of exchanges with China, we have never experienced any problems with China," he said.
"The Silk Road initiative and China's strategic orientation are very much in line with the kingdom's Vision 2030," Prince Mohammed said.
Earlier, he met Chinese vice premier Han Zheng at the Great Hall of the People in Beijing. They discussed ways of strengthening relations and national security before Prince Mohammed presided at a China-Saudi co-operation forum and its signing ceremony.
Mr Han said the two countries should enhance exchanges on their experiences in de-radicalisation, China's official Xinhua news agency said in a separate report.
Aramco will develop a 300,000 barrel-per-day refinery in China's northeastern Liaoning province.
Saudi Arabia also signed 35 economic co-operation agreements with China worth a total of $28 billion at a joint investment forum during the visit, Saudi state news agency SPA said.
Prince Mohammed landed in Beijing on Thursday and was met by Khi Li Fung, the Chinese deputy chairman of the advisory and political council.
He later toured the Great Wall of China with the country's ambassador to Riyadh.
Saudi Arabia's Minister of Foreign Affairs, Adel Al Jubeir, held talks with Wang Yi, the Saudi Press Agency reported, while Prince Badr bin Abdullah, the Saudi Minister of Culture, established the Prince Mohammed bin Salman Award for Cultural Co-operation between the two countries.
The China trip is part of Prince Mohammed's Asian tour after visiting India and Pakistan earlier this week.
In New Delhi on Wednesday, the Saudi royal said Riyadh is looking to tap into over $100 billion in investments in India. In Pakistan, Prince Mohammed pledged $20bn in investments to its Prime Minister, Imran Khan.
He is expected to visit South Korea next.