The development of new antibacterial agents is particularly important in the battle against pathogenic microorganisms. In this study, sulfonium ions were used as the structural core to synthesize alkyl-substituted ionic compounds as antibacterial agents. The antimicrobial activity of sulfonium ionic compounds against Escherichia coli and Staphylococcus aureus was analyzed by measurement of the minimum inhibitory concentration and minimum bactericidal concentration. The effects of sulfonium salts on cell membrane integrity and permeability were investigated by detecting the extracellular proteins leakage of E. coli and S. aureus upon contact treatment, and observing the bacteria’s ultrastructural changes with transmission electron microscopy. The results showed that all the sulfonium salts exhibited resistant activity. Sulfonium salt with alkyl chain length of 16 carbon presented the strongest resistance with MIC of 30 and 3.75 μmol/L, and MBC of 120 and 60 μmol/L against E. coli and S. aureus, respectively. After treatment with sulfonium salts, the permeability of the membrane of E. coli and S. aureus cells changed, and the exudation of extracellular proteins increased significantly. The transmission electron microscope showed that the surface of the bacteria had shrunk and the cell walls had burst. The group of sulfonium salt compounds can destroy the integrity of cell membrane and change membrane permeability to achieve antibacterial purposes.