Following the movement of individual molecules of a bacterial surface protein in vivo we investigated the effects of antibiotics and antimicrobial peptides on protein motility and membrane structure. In previous work we engineered the λ-receptor of Escherichia coli such that less than one receptor per cell is in vivo biotinylated and can bind to a streptavidin coated bead. Such a bead served as a handle for the optical tweezers to follow the motion of an individual receptor. In an un-perturbed living cell the λ-receptor performs a confined diffusive motion. The λ-receptor links to the peptidoglycan layer, and indeed, a perturbation of the peptidoglycan layer had a pronounced effect on the motility of the receptor: The motility significantly decreases upon treatment with vancomycin or ampicillin, to study the effect of vancomycin we used strains with increased membrane permeability. As the motility of an individual receptor was monitored over an extended amount of time we were able to observe a temporal evolution of the action of vancomycin. Antimicrobial peptides (AMPs) are alternatives to conventional antibiotics in the treatment of bacterial infections. Therefore, we also investigated the effect of the toxic AMP polymyxin B (PMB) which targets both the outer and inner membranes and kills the organism. PMB significantly decreased the motility of the λ-receptor. On the basis of these findings we confirm that the λ-receptor is firmly attached to the peptidoglycan layer, and that an antibiotic or AMP mediated destruction of the dynamic peptidoglycan synthesis decreases the receptor motion.