Bronsted acid and base interactions are a cornerstone of chemistry describing a wide range of chemical phenomena. However, probing such interaction at the solid-liquid interface to extract the elementary and intrinsic information at a single-molecule level remains a big challenge. Herein, we employ an STM break junction (STM-BJ) technique to investigate the acid-base chemistry of carboxylic acid-based molecules at a Au (111) model surface and propose a prototype of a single-molecule pH sensor for the first time. The single-molecule measurements in different environmental conditions verify that the formation probability of molecular junctions is determined by the populations of deprotonated -COO- form in a self-assembled monolayer. Furthermore, the variation of the intensity of the conductance peaks (i.e., junction-forming probability) with the pH of the bulk solution fits well to the Henderson-Hasselbalch type equation. From the equation, a good linear relation is found between the degree of dissociation of the immobilized -COOH group and the environmental pH, providing a feasible way to design chemicals and biosensors and a detector at the single-molecule scale.