The orthogonal time frequency space (OTFS) modulation technique can provide reliable communication in time-varying channels. Due to the dispersive characteristics of underwater acoustic channels, this paper proposes an OTFS-IM underwater acoustic communication system based on Hamming distance optimization to reduce the impact of dispersion in underwater acoustic communication. Firstly, the OTFS-IM underwater acoustic communication system is introduced, which introduces index modulation into the Delay–Doppler (DD) domain to make the OTFS system have stronger anti-Delay–Doppler capability. In contrast, since there is index sequence redundancy in a specific index combination, a Hamming distance optimization model is used to eliminate the redundant combination in the specific index combination sequence and further improve the bit error rate performance of the system. In addition, the Hamming distance optimized OTFS-IM underwater acoustic communication system is verified by simulation analysis. The results show that the proposed Hamming distance optimized OTFS-IM can achieve more reliable bit error rate performance.