Upvote:6
Yes, you do need a visa. While almost everybody can transit through HKIA visa-free, Pakistani passport holders belong to the "^" group where:
All nationals (except holders of Diplomatic and Official passports) are required to hold a valid visa for the HKSAR for whatever purpose (including those who are in transit and remain on the airside).
This applies even for a direct transfer via Hong Kong International Airport, and thus includes the SkyPier direct ferries to Mainland China that do not need to pass through HK immigration.