The Orica-GreenEDGE rider, who surrendered first place to Dumoulin (Giant-Alpecin) yesterday, attacked around two kilometres before the steep finish into Sierra de Cazorla and despite the searing heat had enough in the tank to hold off Daniel Martin (Cannondale) and Dumoulin, who crossed the line together five seconds behind.
Chaves heads the general classification by 10 seconds from Dumoulin, with Irish cousins Martin and Nicolas Roche (Team Sky) in third and fourth respectively.
"I can’t believe I’ve won," Chaves said.
"It was a long, hot, hard stage today. I’m really happy and I want to thank all the team and staff again, they’re all amazing."
Neil Stephens, Orica-GreenEDGE’s team director, was also delighted to register another win for the team, but was playing down any thoughts that Chaves could hold on to the red into Madrid.
"I thought he would wait for tomorrow. But he saw his team-mates had worked hard and he felt obliged to do well,” Stephens said.
“That's the way he is. Esteban rides with the heart, not with the head. For now, he's doing well, but I don't know how far he can go. Maybe not on this Vuelta, but I believe he can become a great champion in the future.
“It's our young riders who win the stages, but if you look at the guys who do the hard work, they're the older ones. And the youngsters can take advantage of it."
Having given up the red jersey, Dumoulin was full of praise for Chaves while expressing his surprise at the attack that saw the Orica-GreenEDGE rider get over the top of him.
"What a race Chaves did. Even better than Sunday," Dumoulin said.
"It didn't expect him to go so early. He went at the very right moment and I didn't have the legs to follow. I had the jersey for one day. It was nice. I would have liked to keep it longer. But it's not a disaster."
Orica-GreenEDGE's Daryl Impey said the Australian outfit, which saw its young star Caleb Ewan win Stage 5, was having a much better time at the Vuelta than in last month's Tour de France, where things had not gone to plan.
"That’s cycling and sports in general, you have your ups and downs and this is fantastic," Impey, who was one of the team’s casualties at the Tour, said.
"I think he (Chaves) is just in great condition at the moment and when you’ve got good condition it seems like he can’t do anything wrong," added the South African.
Sky leader Chris Froome finished seventh and moved up one place to sixth overall in his hunt for the Tour de France-Vuelta double.
Tonight’s (AEST) summit finish on the seventh stage into La Alpujarra is expected to provide one of the first genuine skirmishes among the race favourites.
Frenchmen Jacques Anquetil (1963) and Bernard Hinault (1978) are the only riders to have won the Tour and the Vuelta in the same year.