The crosslinked porous microparticles based on glycidyl methacrylate, N‐vinylimidazole, and triethylene glycol dimethacrylate (molar ratio between monomers 40:30:30) obtained in the presence of three porogenic agents (toluene, n‐butyl acetate, and toluene:n‐butyl acetate mixture, 1:1, v/v) are used as precursors in the polymer analogous reactions with some betainizing agents (sodium monochloroacetate, acrylic acid, methacrylic acid and 1,3–propane sultone) in order to introduce the carboxybetaine/sulfobetaine groups to the tertiary nitrogen atom from the imidazole ring. ATR–FTIR spectroscopy is used to highlight the presence of carboxybetaine/sulfobetaine groups on the structure of the microparticles, but also to calculate the degree of betainization (55.91%–90.2%) The zwitterionic microparticles are characterized by scanning electron and atomic force microscopies, equilibrium swelling ratio as a function of pH values, swelling kinetics, ion exchange capacities and particle size distribution. Also, the parameters of porous structure (pore diameter, pore volume, porosity, and specific surface area) are determined by mercury porosimetry. The antibacterial properties of Gram‐positive (Enterococcus faecalis and Staphylococcus aureus) and Gram‐negative (Escherichia coli and Klebsiella pneumoniae) bacteria are evaluated. It is found that the zwitterionic structures containing a shorter length alkyl chain between ionic groups exhibit excellent antibacterial activity of about 80%–92%.