Hyperbranched poly(amido amine) demulsifiers (PNDA-1 or PNDA-2) were synthesized with 1,5-diaminonaphthalene or 1,8-diaminonaphthalene as the central core by an improved "one-pot" method. Fourier transform infrared spectroscopy, nuclear magnetic resonance hydrogen spectra, and thermogravimetric analysis were utilized to explore their structure and thermal stability. It indicated that the two hyperbranched demulsifiers had good thermal stability. To evaluate their demulsification performance, some important factors such as concentration of the demulsifier, types of emulsion, temperature, and settling time were systematically investigated. When 80 mg/L of PNDA-1 or PNDA-2 was used in oily wastewater (O/W emulsion) at room temperature for 4 h, the light transmittance of the separated water reached 73.7 and 59.3%, respectively. The corresponding oil removal rate reached as high as 99.62 and 99.50%, respectively. After demulsifying with the concentration of 80 mg/L at 70 °C for 120 min, the demulsification efficiency (DE) of PNDA-1 and PNDA-2 in the crude oil emulsion (W/O emulsion) reached 92 and 83%, respectively. The DE of PNDA-1 is obviously better than that of PNDA-2 in both O/W and W/O emulsions. The possible demulsification mechanism was discussed by the interfacial tension, zeta potential, and micrograph analysis. The current work provided new hyperbranched demulsifiers, and the discussion on the mechanism also provided some references for the research of a demulsifier.