Controlling selective glycerol electrooxidation towards the primary or secondary alcohol group, which enables obtained dihydroxyacetone or glyceraldehyde as the main product, is a challenge for an effective glycerol electrolysis system. In this work, we systematically investigated the protective effect of borate-glycerol complexes toward primary and secondary alcohol group oxidation during the glycerol electrooxidation process on NiOx catalyst in borate buffer (pH 9.2). The Raman spectroscopy and high-performance liquid chromatography results indicated that manipulating the borate/glycerol (B/G) ratio could affect selective oxidation towards primary or secondary alcohol group. Five-member ring complex was more likely to form in the electrolyte with the B/G ratio of 0.1, whereas six-member ring complex became more significant in the electrolyte with the B/G ratio of 1.5. The dominance of five- or six-member ring complex could enhance the favored adsorption of primary or secondary alcohol group, thus generating glyceraldehyde or dihydroxyacetone as the main product, respectively. The results in this study highlight the significance of electrolyte property on glycerol electrocatalysis, which is universally applicable to other transition metal electrocatalysts, enabling the development of a highly selective glycerol electrooxidation towards primary or secondary alcohol system at near-neutral pH level.