A murder suspect whose case was used by the Hong Kong government to push for a controversial extradition bill walked free from jail on Wednesday as the city's authorities squabbled with Taiwan over how to handle a promised voluntary surrender.

Chan Tong-kai, a Hong Kong citizen, was accused of murdering his girlfriend in Taiwan last year before fleeing back to the Chinese-ruled financial hub.

Chan, wearing a navy blue shirt and red backpack, bowed and apologized to the family of his ex-girlfriend and the public as he left the prison in Hong Kong's rural Sai Kung district after serving 29 months for money laundering.

He said he had made an "unforgivable mistake" and was willing to plead guilty and turn himself in to Taiwan for trial.

The Hong Kong government seized on the case to justify pushing through a now-withdrawn extradition bill, leading to five months of sometimes violent protests that have now evolved into broader calls for democracy.

"I hope her family can be relieved a bit and let her rest in peace," he said, declining to say when he would turn himself in.

"For the society, for Hong Kongers I can only be sorry. I hope you can all forgive me ... let me be a new person and give me the opportunity to return to society."

While Chan has offered to surrender himself voluntarily, Hong Kong and Taiwan have clashed over the next steps.

An extradition bill would have allowed criminal suspects to be sent from Hong Kong to greater China, including the mainland, Taiwan and Macau.

The government has announced it will withdraw the bill but the protests have not stopped. The city's legislature is due to withdraw it formally on Wednesday.

Hong Kong's Secretary for Security John Lee said on Wednesday that Taiwanese authorities were obstructing the case for "political reasons" and Chan should be free to go to Taiwan and surrender himself.

Taiwan has argued that his extradition without a legal assistance framework would damage Taiwan's sovereignty and put Taiwan under the "one China" framework.

Beijing considers Taiwan to be a wayward province of "one China", ineligible for state-to-state relations, and has never renounced the use of force to bring the island under its control.

Taiwan's Mainland Affairs Council said in a statement earlier on Wednesday it was "unbelievable" that Chan could be expected to take a flight to Taiwan by himself, "completely ignoring the safety of passengers on the same flights in order to serve the political arrangement of a 'surrender'".

It said Taiwan had repeatedly asked for legal cooperation.

"We are solemnly telling the Hong Kong government that you have to take full responsibility for all bitter consequences," the council statement said.

Taiwan has also said it wanted to send officers to Hong Kong to escort Chan back to the self-ruled island upon his release, a move the Hong Kong government has described as a disrespectful and unacceptable attempt to cross legal jurisdictions.

Taiwan President Tsai Ing-wen weighed in on Wednesday, saying Taiwan would "take care of the matter" adding there was no "such thing as surrender, only arrest".

Chan was arrested by Hong Kong police in March 2018 and authorities there were only able to find evidence against him for money laundering.

Hong Kong's leader Carrie Lam reluctantly agreed to withdraw the extradition bill two-and-a-half months after anti-government protests escalated in June, although its formal withdrawal is unlikely to end the unrest.

Protesters are angry about what they see as Beijing encroaching on Hong Kong's "one country, two systems" formula enshrined during the handover from British to Chinese rule in 1997. That formula allows the city wide-ranging freedoms not available on the mainland, such as an independent judiciary.

The extradition bill was seen as the latest move by Beijing to erode those freedoms. China has denied such claims and accuses foreign countries of fomenting trouble.

The Financial Times, citing people briefed on the deliberations, reported on Monday China is drawing up a plan to replace Lam with an "interim" chief executive.