A housing of a portable electronic device includes a main body, a waterproof structure, and a plug retainer. The main body defines a jack hole therein. The waterproof structure is formed on the main body and defines a plurality of waterproof grooves. The plug retainer is received in the waterproof structure and defines a connecting hole and a plurality of draining holes therein. The connecting hole is aligned with the jack hole, and the draining holes guide water entering the plug retainer to flow into the waterproof grooves.