The Lotto Soudal rider hunted down stage favourite Dylan Groenewegen and pipped him on the line in Toulouse.
Italian Elia Viviani finished the 167km flat ride from Albi in third place.
France’s Julian Alaphilippe retained the overall leader’s yellow jersey while Geraint Thomas remains second after a safe finish with the peloton.
“I can’t believe it,” said Ewan. “I have been close in the last four sprints I have done.
“My team never lost faith in me and I never lost faith in myself.”
More to follow.