Zwitterionic materials have attracted increasing attentions in the underwater super-oleophobic applications for its strong hydration via electrostatic interactions. Herein, molecular dynamics simulations were used to investigate the hydration and underwater oleophobicity of sulfobetaine-terminated self-assembled monolayers (SB-SAMs) with different carbon spacer lengths (CSL) between oppositely charged groups of SB molecules. Simulation results show that the hydration of SB-SAMs is positively dependent on CSL; the underwater oleophobicity is strengthened and then weakened with the increase of CSL, reaching optimal performance when CSL = 3; Adhesion force of oil droplet on SB-SAMs is inversely correlated with their contact angles, reaching the minimum value when CSL = 3. Moreover, the addition of NaCl can weaken the self-association of SB molecules resulted from interactions between cationic and anionic groups, which promotes hydration and enhances underwater oleophobicity of SB-SAMs. These results will benefit for the design of novel zwitterion-based materials for anti-fouling and oil-water separation applications.