Prime Minister Anthony Albanese has accepted an invitation from Chinese President Xi Jinping to visit Beijing before the end of the year.
Confirmation of the visit came during a meeting between the prime minister and China's second-in-command, Premer Li Qiang, on the sidelines of the East Asia Summit in Jakarta.
The bilateral talks between the two leaders come as both countries seek to ease long-running diplomatic tensions and resolve trade blockages on billions of dollars worth of Australian goods.
The upcoming trip to China will mark the 50th anniversary of prime minister Gough Whitlam's visit to the Asian nation.
Mr Albanese said he had a "frank and constructive" discussion with China's premier, with the pair discussing trade impediments, human rights issues and the fates of five Australians being detained in China, including journalist Cheng Lei.
"Australia seeks to work towards productive and stable relations with China based on mutual benefit and respect," Mr Albanese told reporters.
"The co-operation and engagement between our two countries is always improved when there is dialogue, when there's discussion. That's how you get mutual agreement."
The last Australian leader to visit China was former prime minister Malcolm Turnbull in 2016.
The Chinese premier said in opening remarks that there had been positive momentum in the relationship between Australia and China since Mr Albanese met with Mr Xi at last year's G20 summit.
"Since then, thanks to the concerted efforts of both sides, China-Australia relations have continued to show positive momentum and more improvement," he said.
"A review of past interactions show when our relations are good and sound, both peoples benefit, and when things are not going so well, both sides lose from it."
While China had lifted tariffs on Australian barley, trade impediments remain on other Australian goods including wine and lobster.
Trade impediments imposed by China have resulted in a more than $20 billion reduction in the value of exports to the Asian nation, with more than $2 billion of blockages remaining.
Mr Albanese said officials continued to work on resolving trade blockages on Australian wine.
"That essentially is how the barley issue was resolved in the interest of both of our countries," he said.
"It was acknowledged that we have an interest in working these issues through."
The prime minister said he raised the issue of detained Australians in China, including three who have been sentenced to death.
"We will always make representation for Australians who have been given the death sentence for that to be removed," he said.
The two leaders also discussed China's economy, which had been experiencing a recent downturn, but Mr Li expressed confidence in China's middle class growth.
Mr Albanese then held one-on-one talks with Indonesian President Joko Widodo, where the pair discussed priority sectors such as agriculture, green energy, education and healthcare.
The prime minister also raised the issue of lumpy skin disease in cattle and the need for the issue to be resolved, with Indonesia confirming technical experts were meeting on it.
The two leaders then co-chaired the ASEAN-Australia Summit, where Mr Albanese said the federal government was committed to growing ties with the region and addressing issues such as climate change and food security in Southeast Asia.
Mr Albanese also announced new measures as part of a $200 million Australia-Indonesia climate and infrastructure partnership, including funding to support net-zero initiatives in Indonesia.
The prime minister will fly out of Jakarta to the Philippines on Thursday, ahead of bilateral talks with President Ferdinand Marcos Jr.