The adsorption/desorption of OH∗ on electrode surfaces is pivotal in numerous electrocatalytic reactions. To understand the effect of electrolyte pH on that process, in this work, an advanced approach combining ab initio molecular dynamics (AIMD) with free energy perturbation is employed to calculate the dehydrogenation free energy of water chemisorbed at differently electrified Pt(111)/electrolyte interfaces. Our findings reveal that the onset potential for OH∗ formation shifts negatively as the pH increases at low pH condition (pH<4.3), aligning with the cyclic voltammetry curves observed in experimental studies. It indicates the dissociation of chemisorbed water is the primary route for OH∗ adsorption at low pH condition. Furthermore, it is also found that the variation in dehydrogenation energy across different pH is primarily due to the local hydrogen bonding network surrounding the chemisorbed water. In addition, it is proposed that at high pH conditions OH− oxidation emerges as the primary route for OH∗ adsorption on Pt(111) constrained by the water chemisorption process. This work provides crucial insights into the pH-dependent adsorption behavior of OH∗ on the Pt(111) surface and aims to guide the optimization of electrolytes to boost the efficiency of related reactions.