The Barloworld rider crossed the line 38 seconds ahead of a chasing pack of nine riders, which included yellow jersey holder Michael Rasmussen and Spanish rival Alejandro Valverde.
The final race in the Alps extended Rasmussen’s lead in the overall standings to two minutes and 35 seconds over second-placed Valverde, and almost ended Tour favourite Alexandre Vinokourov’s chances of glory in Paris after he struggled with sickness and finished well down the pack.
Soler Hernandez made his breakaway with 10km remaining on the ascent up to the summit of Col du Galibier, the final climb of the day. And the visibly delighted stage winner said: “I just wanted to get to the finish as the last few kilometres were flat and I felt I could win.
“I had good legs after the day off yesterday and I felt I could recover and do something today. I didn’t want to leave the Tour without feeling I had achieved something. But it’s my first Tour and if I can do something else then I will.”
Dane Rasmussen was delighted to keep hold of the overall lead and the Rabobank rider, who is also leading the King of the Mountains standings, was in doubt about where his priorities lay.
“It’s all about the yellow jersey, the polka dot is secondary,” he said. “I’m still in the lead by almost three minutes and the next big test will be in the time trial, but I’m confident for the next four days.”
Race leader Rasmussen led the peloton from the start line at Val d’Isere but it took only 3km before Spanish rider Jose Luis Arrieta led the first attack.
The AG2R rider was soon caught by Ukrainian Yaroslav Popovych who took the race into his own hands and led a solo breakaway.
Popovych was the first rider over the infamous Col d’Iseran, the highest point of the 2007 Tour at 2,770 metres, and he led another small group of five riders down the steep descent to Bonneval-sur-Arc, a full 70 seconds ahead of the peloton at the 40km stage.
The six escapees soon started to up the pace and had amassed an impressive lead of three minutes and 20 seconds by the 65km stage, leaving the chasing peloton struggling to rein them in.
And their cause was further disrupted when German T-Mobile rider Marcus Burghardt, a member of the chasing peloton, was involved in a spectacular crash with a wandering golden retriever that crossed his path and sent him tumbling to the wayside with his front wheel crumpled beneath him.
The searing heat and punishing alpine conditions were soon starting to affect the breakaway as their lead was whittled down to just two minutes as the riders started their ascent of the Col du Telegraphe.
However, they kept their composure to maintain their advantage before the final climb of the Alps — the Col du Galibier.
The 17.5km mountain separated the leading riders and it was Soler Hernandez who took the initiative and started a devastating breakaway of his own.
With just 1km remaining the Colombian held a one-minute lead over duo Alberto Contador and Popovych, and a further 27-second advantage over the chasing group of seven riders.
As Rasmussen pressed the group in an attempt to close the gap, they reined in the battling duo in the closing stages but Soler Hernandez was in no mood to be caught as he crossed the line in a time of four hours 14 minutes and 24 seconds to taste glory.