Go to http://www.gov.hk/en/apps/immdpassportinhk2.htm to apply online for a passport in Hong Kong.
Gather the necessary documentation. To apply for a passport, you will need the Local Application Form ID 841 if you are over 16 and 842 if you are under 16. With the application form must be a color photo 40 mm x 50mm on a white background. You will also need a copy of your Hong Kong ID card, if you have one. For full details on the required documentation, see http://www.gov.hk/en/residents/immigration/traveldoc/hksarpassport/supportingdocuments.htm
Complete and upload the online application form.
Upload the color photograph. The photograph must be in JPEG format and must be 600KB or less.
Upload a copy of your Hong Kong ID card.
Pay the application fee. If you are over 16, your application fee will either be $48 USD or $59 USD depending on the length of the passport. If you are under 16, you will pay either $24 USD or $29.50 USD, depending on the length of the passport.