"We welcome the release of Simon Cheng and are delighted that he can be reunited with his family," a Foreign Office spokeswoman said, confirming his freedom. "We will continue to provide support to them."
She added that Mr Cheng and his family had "requested privacy".
He was released as scheduled after 15 days of administrative detention, public security authorities in the Chinese city of Shenzhen said in a statement.
The Luohu public security bureau in the mainland city neighbouring Hong Kong, made the announcement on its Weibo microblog account.
Mr Cheng was detained for violating mainland Chinese law and "confessed to his illegal acts", the statement said, without providing further details.
"Simon is released. Simon is safe," Max Chung, a supporter of Mr Cheng said. "We've just managed to talk to him over the phone," he said, adding that Mr Cheng would answer any further questions, but did not say when.
Mr Cheng thanked people for their support in a Facebook post that was later taken down.
"Simon and his family wish to have some time to rest and recover," it read. " We will explain more later."
Support free-thinking journalism and subscribe to Independent Minds
Mr Cheng's detention stoked tensions in Hong Kong, which has seen months of anti-government protests.
The Scottish Government trade and investment officer was hired locally and did not have a diplomatic passport.
He was detained after he left for a business trip to mainland China.