A high-precision seawater pH in-situ measurement system based on valve terminal, the system including: a flow path module, an optical path module and a circuit module; wherein the flow path module includes a valve terminal, a flow cell, and an indicator bag, a pulse pump, and a peristaltic pump, the indicator bag being connected to the valve terminal through the pulse pump, one end of the flow cell being connected to the valve terminal through the peristaltic pump, and the other end of the flow cell being connected to the valve terminal; the valve terminal being further provided with a seawater sampling pipeline, a seawater waste liquid discharge pipeline and an indicator waste liquid discharge pipeline; the optical path module is configured to measure absorbance of a sample at characteristic wavelengths, the optical path module including a light source coupling module, a miniature spectrometer and optical fibers; wherein the light source coupling module includes three LEDs configured to emit light of different wavelengths arranged therein, the light is transmitted through the optical fibers and the flow cell and arrives at the miniature spectrometer, and the miniature spectrometer is configured to detect intensity of the light after passing through the flow cell; the circuit module is respectively connected to the peristaltic pump, the pulse pump, the valve terminal and the spectrometer, the circuit module being configured to control the on-off of the peristaltic pump, the pulse pump, the valve terminal and the miniature spectrometer and further configured for data collection; the valve terminal includes four two-position three-way solenoid valves: a first solenoid valve, a second solenoid valve, a third solenoid valve, and a fourth solenoid valve, each of the solenoid valves having a total of three ports: a normally closed port a, a normally open port b and a third port, wherein the seawater sampling pipeline is connected to the normally open port b of the first solenoid valve, the third port of the first solenoid valve is connected to the normally open port b of the second solenoid valve, the normally closed port a of the second solenoid valve is connected to the indicator bag through the pulse pump, the third port of the second solenoid valve is connected to the third port of the third solenoid valve, the normally open port b of the third solenoid valve is connected to one end of the flow cell through the peristaltic pump, the normally closed port a of the third solenoid valve is connected to the indicator waste liquid discharge pipeline, the normally closed port a of the fourth solenoid valve is connected to the normally closed port a of the first solenoid valve, the normally open port b of the fourth solenoid valve is connected to the seawater waste liquid discharge pipeline, and the third port of the fourth solenoid valve is connected to the other end of the flow cell. the flow path module includes a valve terminal, a flow cell, and an indicator bag, a pulse pump, and a peristaltic pump, the indicator bag being connected to the valve terminal through the pulse pump, one end of the flow cell being connected to the valve terminal through the peristaltic pump, and the other end of the flow cell being connected to the valve terminal; the valve terminal being further provided with a seawater sampling pipeline, a seawater waste liquid discharge pipeline and an indicator waste liquid discharge pipeline; the optical path module is configured to measure absorbance of a sample at characteristic wavelengths, the optical path module including a light source coupling module, a miniature spectrometer and optical fibers; wherein the light source coupling module includes three LEDs configured to emit light of different wavelengths arranged therein, the light is transmitted through the optical fibers and the flow cell and arrives at the miniature spectrometer, and the miniature spectrometer is configured to detect intensity of the light after passing through the flow cell; the circuit module is respectively connected to the peristaltic pump, the pulse pump, the valve terminal and the spectrometer, the circuit module being configured to control the on-off of the peristaltic pump, the pulse pump, the valve terminal and the miniature spectrometer and further configured for data collection; the valve terminal includes four two-position three-way solenoid valves: a first solenoid valve, a second solenoid valve, a third solenoid valve, and a fourth solenoid valve, each of the solenoid valves having a total of three ports: a normally closed port a, a normally open port b and a third port, wherein the seawater sampling pipeline is connected to the normally open port b of the first solenoid valve, the third port of the first solenoid valve is connected to the normally open port b of the second solenoid valve, the normally closed port a of the second solenoid valve is connected to the indicator bag through the pulse pump, the third port of the second solenoid valve is connected to the third port of the third solenoid valve, the normally open port b of the third solenoid valve is connected to one end of the flow cell through the peristaltic pump, the normally closed port a of the third solenoid valve is connected to the indicator waste liquid discharge pipeline, the normally closed port a of the fourth solenoid valve is connected to the normally closed port a of the first solenoid valve, the normally open port b of the fourth solenoid valve is connected to the seawater waste liquid discharge pipeline, and the third port of the fourth solenoid valve is connected to the other end of the flow cell.