Nanofiltration technology has opened an efficient pathway to addressing the grand issue of wastewater purification. Polyethyleneimine (PEI), as a hydrophilic polymer, is a promising material to manufacture separation membranes owing to its superiority. Here, we prepared a hyperbranched PEI-based separation membrane through the supramolecular hydrogen bond interaction for wastewater purification. The amino groups in the PEI molecule were partially oxidized to the nitro groups with sodium hypochlorite (NaClO). Moreover, the PEI molecular chains can be regulated from the hyperbranched state to the internal nucleation state. Molecular dynamics simulation results further indicated the strong hydrogen bonds among the oxidized PEI (O-PEI) molecular chains and the decreased gyration radius of the O-PEI molecule due to the formation of the nitro groups. In addition, the wettability and zeta potential of O-PEI membranes can be controlled by adjusting the molecular weight and oxidation degree of the PEI molecules. Under the collective effect of size screening and charge repulsion, the O-PEI separation membrane displayed a wide range of purification capabilities for contaminations, such as dye molecules and salts. This work may offer a new strategy to fabricate hyperbranched O-PEI membranes for wastewater purification.