The recall concerns products distributed by Mars Chocolate UK and Mars Ireland and made at the firm's plant in Slough.
It involves some Galaxy Chocolate bars, Minstrels, Counters and Teasers bars with best before dates in May 2018.
The firm estimated that less than 3,000 potentially affected bars and bags could have been purchased by consumers in the UK.
Symptoms caused by Salmonella usually include fever, diarrhoea and abdominal cramps.
Mars said it has not received any consumer complaints.
“We have detected the possible presence of Salmonella from the ingredients used in making some of our Galaxy products, including Smooth Milk Chocolate bars, Minstrels and Counters and Teasers bars, whilst carrying out our routine testing process,” said a Mars Chocolate spokesman.
“A small number of these products have been distributed, and although we've had no related complaints, as a precaution we have made the decision to voluntarily recall the products potentially affected by this issue in order to ensure the safety and confidence of our consumers.
“We are working closely with the relevant food safety authorities and our customers to ensure that the affected products are no longer available for purchase.
“If you have one of the products listed above, you should not eat it. Please keep the product and contact our Consumer Care team to arrange return and reimbursement.”
Mars added no other brands or varieties of chocolate, pack formats, bar sizes or best before dates are affected.
Early last year, Mars Chocolate recalled a variety of chocolate bars from more than 50 countries after plastic was found in one of them.
Mars, Snickers and Celebrations products were affected with Milky Way and Miniatures also involved. A piece of red plastic was found in a Snickers bar purchased in Germany.
Affected bars were produced in a factory in the Netherlands (Veghel) and the warning of pieces of plastic was due to an ‘incident’ during production.
Salmonella in chocolate has caused past recalls, with more than 20 countries and numerous brands being affected in 2015.
A chocolate wafer from the Netherlands and distributed to Australia, Austria, Belgium, France, Germany, Ireland, Italy, Luxembourg, Malta, Poland, Sweden, Switzerland and the UK was found to contain the pathogen .
Consenza, Atkins, Dr Schär, Damhert Nutrition, Valeo Foods and Bakers Delight recalled certain products in one or more countries. Bars were sold under different labels – including for supermarkets such as Tesco, Asda and IKA.