Ocean exploration-oriented temperature and salinity (TS) sensor based on bend-insensitive microfiber Mach-Zehnder interferometer (MMZI) is proposed and demonstrated in a marine environment. To solve the demodulation problem induced by the narrow waveband of the spectrometer used in the sea trial, a MMZI sensor is calibrated and demodulated by machine learning method. Results show that even if the wavelength range used in demodulation is as small as tens of nanometers, a relatively accurate demodulation can still be achieved. Then a sea trial is performed based on the design of the test system on board. Compared with commercial conductivity-temperature-depth systems, mean relative errors of 2.28% and 2.29% for TS measurement are obtained. In addition, the influence of spectral range on the demodulation result and response of the spectrum to fiber bending is discussed. Repeatability and stability of the sensor are proved in repeated sea trials. The sensor demonstrated here provides a new optical method for measuring TS in seawater with the advantages of multi-parameter measurement, low cost, easy deployment, and high accuracy, which will hopefully become a useful complement to the existing electrical method used in ocean exploration.