The study reveals that the chemical - known as allicin - could be an effective treatment against infectious bacteria that are highly resistant to most antibiotics.
Allicin is produced naturally by garlic bulbs to ward off a closely-related group of plant pathogens found in soil and water habitats.
In the 1980s, the bacteria - known as the Burkholderia cepacia complex (Bcc) - emerged as a cause of serious and transmissible lung infections in people with cystic fibrosis.
Measures to limit the spread of infections among people with cystic fibrosis have brought the number of cases down considerably.
Current therapies available to treat infections - that are potentially fatal - are limited and require the use of combinations of three to four antibiotics at a time.
Researchers found that allicin - which can be extracted by crushing raw garlic - inhibits the growth of bacteria and, at higher doses, kills the pathogens.
The team suggests that allicin kills Bcc bacteria by chemically modifying key enzymes. This deactivates them and halts important biological processes within the pathogens’ cells.
The team believes allicin-containing remedies could be used in combination with existing antibiotics to treat Bcc infections.
Researchers say it is important to pinpoint the mechanisms by which allicin kills the bacteria before the chemical can be incorporated into new treatments.
The Bcc are highly versatile plant and human pathogens that have not been studied to the same extent as other superbugs, such as MRSA.
The bacteria produce potent antimicrobial agents which kill bacteria and fungi, making them naturally drug-resistant and allowing them to survive in polluted and antibiotic-rich environments.
The team says the Bcc also have a range of potential uses in the agriculture industry.
The study, published in the journal PLoS One, was funded by the Biotechnology and Biological Sciences Research Council.