## 1 Introduction  
Every year, a significant amount of wastewater, mainly composed of industrial effluent and municipal drainage water, is released into the environment, which has disastrous consequences. There is an urgent need to develop a facile and green wastewater treatment system with high performance that can be made available to varied areas and fields. On the one hand, as an alternative treatment method, the electrochemical oxidation (EO) process shows high efficiency for waste organic degradation owing to its environmental compatibility and versatility. It provides an ideal solution to wastewater treatment. On the other hand, hydrogen energy has been regarded as having strategic status due to its clean and effectively reproducible advantages, which can also be produced by electrochemical methods. In this circumstance, the development of a binary electrochemical system combined with EO treatment and hydrogen gas generation simultaneously has significant economic and sustainable potential [1; 2]. In addition, the combination of hydrogen production and electrochemical wastewater degradation can partly offset the cost of energy consumption. Currently, a variety of materials, such as glass carbon, platinum, graphite, titanium, and metal oxides, are used as electrodes in the EO industries [3; 4; 5; 6; 7]. Among them, boron-doped diamond (BDD) film electrodes have attracted attention since they are promising anodes in wastewater treatment due to the lower adsorption surface, high anti-corrosion performance, low background current, and wide potential window [8; 9]. In comparison to many traditional electrode materials, BDD films can be used as both anodes and cathodes in environmental electrochemistry [10]. Hydroxy radicals (OH\({}^{\star}\)) generated at the BDD surface at high anodic potentials are highly efficient oxidants to decompose organics in the electrolyte, finally forming smaller molecules such as CO\({}_{2}\) and H\({}_{2}\)O [11]. This unique property makes BDD suitable for the degradation of toxic but stable materials, such as nitrophenol and multiwall carbon nanotubes [12]. Meanwhile, a large number of small molecules and ion species, including hydrogen ions, are generated at the anode surface, which will arrive at the cathode and transform into H\({}_{2}\) in the reduction process. However, sufficient active sites or reaction pathways cannot be provided on common BDD electrodes to satisfy the reaction requirements of mass transfer rate. In addition, polymerization often takes place on the BDD surface for many kinds of organics, which will decrease the degradation efficiency since they cover the active sites of the electrode. The existing problems limit the further improvement of BDD's electrochemical efficiency. One of the solutions to these limitations is using a dynamic electrode with special structures providing more active sites and ion channels to improve the electrochemical property. In this study, we proposed an electrochemical system with dual functions for simultaneous wastewater EO treatment and hydrogen production using a rotating hole-arrayed boron-doped diamond (HABDD). The reaction areas on the rotating HABDD electrode are expanded from the plane surface to the sectional depth, which forms a flowing three-dimensional reaction zone [13] and exposes more active sites in the electrolyte [14]. The kinetics process of the 3D holey framework in HABDD enables the ions to be efficiently transported to active sites buried deeply in the electrode [15]. The fast flowing through the holes will disperse through a dynamic three-dimensional structure, improving the mass transfer rate on the HABDD electrode surface and in the electrode space [16]. The EO efficiency of the HABDD was studied using the chemical oxygen demand (COD) removal rate. The liberated protons (H\({}^{+}\) ions) from the HABDD are diffused and discharged at a foam Nickel (FNi) cathode to generate hydrogen gas.