The Scottish rider won the 12th stage of the Tour as the race left the Alps on the longest stage this year, and his compatriot Bradley Wiggins kept the yellow jersey.
Millar's victory came exactly 45 years after Tom Simpson, the first Briton to wear the yellow jersey, died on the slopes of the daunting Mont Ventoux after using a lethal cocktail of amphetamines and alcohol.
The 35-year-old Scotsman on the U.S. Garmin-Sharp team has for years been the peloton's most vocal critic of doping — saying he learned hard lessons after "making a mess" of his life through drug use.
The 226-kilometre ride from Saint-Jean-de-Maurienne to Annonay-Davezieux featured two big climbs, but did not change the top standings because Wiggins and his main rivals for the title finished together.
Millar punched the air as he edged Frenchman Jean-Christophe Peraud at the line in a two-man sprint - five seconds ahead of three others also in the breakaway that dusted the pack on the Granier pass.
Millar collected his fourth career Tour stage victory, and his first since 2003. He also became the fourth Briton to win a Tour stage this year, after Mark Cavendish, Christopher Froome and Wiggins.
The victory was also a vindication for Garmin-Sharp, which had a terrible first week when it lost two top riders to crashes: Giro d'Italia winner Ryder Hesjedal of Canada and Tom Danielson of the United States.
"We fought from the beginning in this Tour, and for me personally, it's enormous," said Millar. "Today I kinda wanted to show that we're still here, and show that Garmin-Sharp is still one of the best teams in the world."
As for the British riders looking so strong ahead of the London Olympics starting next week, Millar said: "Yeah, I think we're at the top" — referring to himself as "the old dog" of the bunch.
Putting his race savvy to work, Millar sped out ahead of the others in the breakaway with about 2 kilometres to go, and Peraud chased. In the last kilometre, it was a two-man battle for the stage win.
Millar kept looking back at Peraud, tight on the Briton's wheel. With a few hundred meters, the Frenchman struck and wheeled around, but it was not enough as the Scottish veteran beat him to the line.
After the finish, Millar lay on the ground on his back, with microphones and cameras hovering over him as he breathed heavily and put his forearm on his forehead with fatigue.
Millar, while riding for French team Cofidis, was banned from cycling for two years in 2004 after admitting to use of banned blood booster EPO — once the drug of choice for cycling cheats — earlier in his career.
"I'm an ex-doper and I'm clean now, and I want to show everyone that it's possible to win clean on the Tour," Millar said.
In the sprint in the main pack, Matt Goss of Australia was penalized for veering slightly to the left and cutting off Slovak sensation Peter Sagan. Goss was relegated to the last place in the peloton and lost key points in their duel for the green jersey of the Tour's best sprinter.
"I'm really angry that we wage war like this, but you can't do like he did," said Sagan, who has won three Tour stages this year.
Shortly after the incident, the Slovak gestured angrily at Goss as they neared the line.
Wiggins was content to let the breakaway go and his powerful Team Sky did not lay chase because the top-placed rider among the five in the bunch was more than 25 minutes back of the Briton as the stage began.
Overall, he leads teammate Christopher Froome, in second, by 2:05, and Vincenzo Nibali of Italy trails third, 2:23 back. Defending champion Cadel Evans is fourth, 3:19 behind. Jurgen Van Den Broeck of Belgium is fifth — 4:48 off the leader's pace.
The riders' ranks continued to thin out on Friday.
Rabobank said its Dutch team leader Robert Gesink, who had been in 67th place more than an hour behind Wiggins, quit the race to focus on the Spanish Vuelta. Rabobank now has only four of its original nine riders remaining.
Dutch rider Tom Veelers of the Argos-Shimano team, after tweeting that Thursday's ride in the Alps was one of the hardest of his career, also pulled out of the race, according to race organizers.
And Cofidis star David Moncoutie crashed around the 38-kilometre mark and dropped out of the race.
The three-week race heads toward the Mediterranean on Saturday for France's July 14 national holiday - Bastille Day - with a 217-kilometre jaunt from Saint-Paul-Trois-Chateaux to Le Cap d'Agde, a coastal resort known for its nudist colony.