The treatment of epichlorohydrin (ECH) wastewater exists chances for achieving cleaner production. This study initially employed moderately halophilic aerobic granular sludge (HAGS) to treat ECH wastewater, and the resulting HAGS was utilized to recover polyhydroxyalkanoate (PHA). During the acclimation process of HAGS, the chemical oxygen demand removal efficiency stabilized at 70 %. Moreover, due to the high enrichment of Halomonas sp. (relative abundance of 86 ± 0.50 %), the maximum PHA content of wasted HAGS was 52.67 wt% in the fermentation process. Simultaneously, the utilization of nuclear magnetic resonance spectroscopy (1H and 13C spectra) and fourier transform infrared spectroscopy for the structural analysis of polymers revealed that polyhydroxybutyrate was the predominant substance extracted from HAGS. In this study, the innovative use of highly enriched HAGS for treating ECH wastewater and simultaneously recovering PHA not only enables the efficient biological treatment of ECH wastewater but also realizes resource recovery of ECH wastewater.