Police said the Ford Focus car he was driving left the southbound carriageway near Lendalfoot and hit the verge at about 19:00 on Monday.
He was taken by ambulance to Ayr Hospital where he was pronounced dead a short time later.
Police said they wanted to speak to anyone who witnessed the crash or saw the Ford Focus on the road before the incident.
A 28-year-old man has died following a crash on the A77 in Girvan.