Influenza A virus is capable of rapidly infecting large human populations, warranting the development of novel drugs to efficiently inhibit virus replication. A transmembrane ion channel formed by the M2 protein plays an important role in influenza virus replication. A reasonable approach to designing an effective antivirus drug is constructing a molecule that binds in the M2 transmembrane proton channel, blocks H+ proton diffusion through the channel, and thus the influenza A virus cycle. The known anti-influenza drugs amantadine and rimantadine have a weak effect on influenza A virus replication. A new class of positively charged molecules, diazabicyclooctane derivatives with a constant charge of +2, was proposed to block proton diffusion through the M2 ion channel. Molecular dynamics simulations were performed to study the temperature fluctuations in the M2 structure, and ionization states of histidine residues were established at physiological pH values. Two types of diazabicyclooctane derivatives were analyzed for binding with the M2 ion channel. An optimal structure was determined for a blocker to most efficiently bind with the M2 ion channel and block proton diffusion. The new molecule is advantageous over amantadine and rimantadine in having a positive charge of +2, which creates a positive electrostatic potential barrier to proton transport through the M2 ion channel in addition to a steric barrier.