I am a Pakistani passport holder. I'm currently in China on a spouse visa. I want to apply for a work visa now. Can I go to Hong Kong to apply for this visa or do I need to go back to Pakistan and apply for a work visa from there?
If you have all the paperwork for your Z visa, you can go to Hong Kong, and apply either directly, at the China Resources Building in Wanchai, or through a travel agency. Note that you won't be converting your spousal visa. You will ce cancelling it, and applying for a new visa, the Z visa.
However, as a Pakistani, you need a visa to go to Hong Kong. So I'm not sure it is worth the effort.
I have heard of travel agencies in Shenzhen, with partners/branches in HK, that can take your passport and documents, send it to HK, process the application, and return the passport with the visa and stamp. Not sure if that still works. Worth enquiring though.