The 26-year-old made his Scotland debut in 2013, playing in 23 one-day internationals and 13 T20 matches.
He featured at the 2015 World Cup and the World Twenty20 in 2016.
"Following medical advice, my long-term health is most important to me and I have to take that into account," said Machan, who has been with Sussex since the age of 10.
"Playing for Scotland brings so much joy and pride to me and the thought of not being able to do that again is a very hard pill to swallow.
"Playing in two World Cups against the very best players is undoubtedly the highlight of my career. I take away memories and friendships that will last a lifetime and for that I am very thankful."
Averaging 33 in ODIs and 40 at T20 level, Machan also took nine ODI wickets with his offspin and five in international T20s.
A career-best score of 192 came for Sussex against Somerset at Taunton in 2015, one of three centuries hit that season.
Scotland and Sussex batsman Matt Machan has been forced to retire because of a wrist injury.