The company, which produces brands including Mars, Extra and Uncle Ben’s, has agreed a 10-year partnership with Eneco UK to receive electricity from a new 20-turbine wind farm in Moy.
The wind farm will generate all of the electricity needed to power all 12 Mars UK sites.
The company, which aims to be fully carbon-neutral by 2040, has manufactured in the UK for 84 years, with 3m Mars bars being produced every day at its plant in Slough.
Barry Parkin, chief sustainability officer for Mars Incorporated, said: "The UK has been home to Mars for 84 years.
“We're proud that the brands that we make here will now be manufactured using renewable electricity, and that we are reducing our carbon footprint in the UK and around the world.
"The Moy wind farm is part of our innovative and long-term approach to achieving our goal to be a successful and sustainable business for generations to come.
"We're not there yet, but we recognise all businesses have a responsibility to tackle climate change and we hope our partnership with Eneco at Moy will encourage other companies to take steps to reduce their own carbon footprint through renewable energy. Working together, government and industry can move the needle on climate change."
The power generated at Moy is equivalent to that used by 34,000 average UK households, and enough to make the number of Maltesers needed to fill 166 Olympic-size swimming pools each year.
Zoisa Walton, Eneco UK country director, said: "This project is very special to Eneco as it brings together all the elements of our strategy - a renewable generating asset, a like-minded partner in Mars, and the opportunity to deliver real benefits to the local community."
WWF Scotland director Lang Banks said: "It's great to see a company like Mars demonstrating global responsibility by supporting the use of wind power in the manufacture of its products here in the UK.
"With its huge renewable energy resources, Scotland is an ideal location to source the power needed to create products sustainably.
"This is a great example of how business can help the UK meet its climate change targets."