The 33-year-old featured for his country 229 times in all formats since making his debut back in 2007 and represented Scotland at five World Cups, including the most recent and still ongoing T20 tournament in Australia.
He played in 88 one day internationals scoring 3026 runs, including 10 centuries and 13 half-centuries, taking 11 wickets.
Reflecting on his decision, MacLeod said: “Having announced my retirement to the team a few days ago, I’m sitting here thinking back to what inspired me in the first place and that would be the Scotland versus Australia game at the 1999 World Cup.
“I remember watching that and thinking ‘that is what I want to do’ and it lit a fire inside me to go on and do everything I could to play for Scotland.
“So, to fast forward to now as I step back having played in five World Cups, I think if you’d told me way back then what I’d go on to achieve with my country, I wouldn’t have believed you.
“Finishing after this World Cup in Australia has been tough because we didn’t manage to achieve what we wanted to achieve, but I leave the group with a real sense of hope that, with the right backing and the right opportunities, the current team can really go far and can inspire many.
“There are too many people who have helped me over the years to thank them all personally now, but I’d like to thank all the coaches, all the staff, all the captains, all the players and all the people at Cricket Scotland who have been involved during my time with the national team.
“They have trusted me and they have given me the opportunity and the platform to go out there and perform at the highest level.
“I just want to say thank you to you all and I hope I repaid the faith you showed in me."