Ampicillin (C16H18N3O4S ; CAS No.: 69-53-4) is an aminopenicillin and, as such, is a broad-spectrum antibiotic and has been used extensively to treat bacterial infections since 1961. It is suspected to cause certain types of cancer in humans and animals. Belonging to the group of beta-lactam antibiotics, ampicillin is able to penetrate Gram-negative bacteria. It inhibits the third and final stage of bacterial cell wall synthesis, which ultimately leads to cell lysis, so it belongs to a group of bactericidal antibiotics.

Ampicillin is often used in molecular biology as a test for the uptake of genes (e.g., by plasmids) by bacteria (e.g., E. coli). A gene that is to be inserted into a bacterium is coupled to a gene coding for an ampicillin resistance (in E. coli, usually the bla gene, coding for β-lactamase). The treated bacteria are then grown on a medium containing ampicillin. Only those bacteria that carry the ampicillin resistance and, therefore, the gene can survive.