Several cation graphite carbon nitrides (g-C3N4-(CH2)n-ImI+) were synthesized by chemically attaching imidazolium appended alkane chains with different lengths (n = 2, 4, 8, 12 and 16) to g-C3N4. The introduction of a cation segment potentially improved the interaction between the carbon material and Gram negative (MDR-A. baumannii) and Gram positive (S. aureus) bacteria as characterized by ζ potential measurement. Short alkane chain (carbon numbers of 2, 4 and 8) carbon materials displayed relatively stronger bacterial interactions compared to long alkane chain bearing ones (n = 12 and 16). In addition, short chain carbon materials (g-C3N4-(CH2)4-ImI+) displayed relatively higher photocatalytic reactive oxygen species (1O2, ˙O2- and ˙OH) production efficiency. Bacterial interaction and ROS production efficiency synergistically contribute to photocatalytic antibacterial performance. The current data revealed that g-C3N4 with short flexible cations attached exhibited bacterial interaction and ROS production. Among these synthesized materials, g-C3N4-(CH2)4-ImI+ exhibited the most pronounced photocatalytic antibacterial efficiency (>99%).