Motion is a key characteristic of every form of life1. Even at the microscale, it has been reported that colonies of bacteria can generate nanomotion on mechanical cantilevers2, but the origin of these nanoscale vibrations has remained unresolved3,4. Here, we present a new technique using drums made of ultrathin bilayer graphene, where the nanomotion of single bacteria can be measured in its aqueous growth environment. A single Escherichia coli cell is found to generate random oscillations with amplitudes of up to 60 nm, exerting forces of up to 6 nN to its environment. Using mutant strains that differ by single gene deletions that affect motility, we are able to pinpoint the bacterial flagella as the main source of nanomotion. By real-time tracing of changes in nanomotion on administering antibiotics, we demonstrate that graphene drums can perform antibiotic susceptibility testing with single-cell sensitivity. These findings deepen our understanding of processes underlying cellular dynamics, and pave the way towards high-throughput and parallelized rapid screening of the effectiveness of antibiotics in bacterial infections with graphene devices.