The ongoing demand for effective antimicrobial materials persists, and lignin emerges as a promising natural antibacterial material with renewable properties. The adaptability of lignin to various chemical modifications offers avenues to enhance its antimicrobial activity. Here, we employed chloromethylation and subsequent functionalization with variable tertiary N-alkyl dimethyl amines to produce C6-C18 quaternary ammonium lignins (QALs) from hardwood (aspen), softwood (pine), and grass (barley straw). Successful synthesis of QALs was confirmed through NMR and FTIR analysis results along with an increase in the surface ζ-potential. Antibacterial activity of QALs against clinical strains of Klebsiella pneumoniae and methicillin-resistant Staphylococcus aureus was assessed using minimal bactericidal concentration (MBC) assay and agar growth inhibition zone (ZOI) test. The antibacterial activity of QALs was found to be higher than that of the unmodified lignins. QALs with longer alkyl chains demonstrated an MBC of 0.012 mg/L against K. pneumoniae already after 1 h of exposure with similar effect size reached after 24 h for S. aureus. For all the lignins, an increase in alkyl chain length resulted in an increase in their bactericidal activity. MBC values of C14-C18 QALs were consistently lower than the MBC values of QALs with shorter alkyl chains. Besides the alkyl chain length, MBC values of barley and pine QALs were negatively correlated with the surface ζ-potential. While alkyl chain length was one of the key properties affecting the MBC values in a liquid-based test, the agar-based ZOI test demonstrated an antibacterial optimum of QALs at C12-C14, likely due to limited diffusion of QALs with longer alkyl chains in a semisolid medium.