Ewan, 21, beat German John Degenkolb (Giant-Alpecin) to the line in the 167.3km stretch to Alcala de Guadaira, with Peter Sagan (Tinkoff-Saxo) third and Jempy Druecker (BMC) fourth.
"It’s an incredible feeling, this is by far the biggest victory of my career," Ewan said.
"It means a lot to me to beat two of the best sprinters in the world and that finish really suited them and they’re strong.
"I knew it would be tough to beat them but I felt good and my team did an awesome job and delivered me perfectly. When I crossed the line there was so much emotion, I was so happy."
Dutchman Dumoulin (Giant-Alpecin) leads the general classification going into tonight’s sixth stage to Sierra de Cazorla by one second from Colombian Chaves, with Irish cousins Nicolas Roche (Team Sky) and Daniel Martin (Cannondale) in third and fourth respectively.
Not that Chaves was too concerned.
“We won with Caleb. It’s amazing how the team worked, it was wonderful. In the end, I lost contact in a roundabout and there were little gaps in the finish because it was quite steep and we lost the red jersey for one second,” Chaves said.
“I'm relaxed and enjoying Caleb´s triumph. In the beginning he suffered a lot and now he has won. The heat is a key factor. Each day is hotter. We began with 28 to 30 degrees and now it was 36 today.”
Sky leader Chris Froome, who won a second Tour de France crown in July and is bidding for a rare Tour-Vuelta double, finished 12th and moved up to seventh overall.
The Briton is bunched with some of his main rivals including Spaniards Alejandro Valverde (Movistar) and Joaquim Rodriguez (Katusha), Valverde's Colombian team mate Nairo Quintana and Italian Fabio Aru (Astana).
Ewan's team-mate Mitch Docker suggested today’s victory may be the first of many for his Australian compatriot.
"He’s just brand new at a grand tour and he showed that he is ready for the next step, it’s amazing," Docker said.
"The last part of the stage was very hard but the final was very smooth after some great work for the team," he added.
"We’ll have lots of champagne tonight."
Frenchmen Jacques Anquetil (1963) and Bernard Hinault (1978) are the only riders to have won the Tour and the Vuelta in the same year.