Because of wet conditions on Sunday, race organisers stopped the clock as Armstrong and the main pack entered central Paris.
Although riders were still racing, with eight circuits of the Champs-Elysees to complete, organisers said Armstrong had officially won.
Alexandre Vinokourov of Kazakhstan eventually won the final stage, with Armstrong finishing safely in the pack to win the Tour by more than four minutes over his closest challenger.
The stage started as it has done for the past six years, with Armstrong celebrating and wearing the race leader's yellow jersey.
One hand on his handlebars, the other holding a flute of champagne, the 33-year-old Texan toasted his teammates as he pedalled into Paris to collect his crown. He held up seven fingers, one for each win, and a piece of paper with the number 7 on it.
Alexandre Vinokourov sprints to
the finish line of the 21st stage
His sixth win last year already set a record, putting Armstrong ahead of four other riders. Frenchmen Jacques Anquetil and Bernard Hinault, Belgian Eddy Merckx and Spaniard Miguel Indurain all have won five Tours each
Armstrong's new record of seven wins confirmed him as one of the greatest cyclists ever, and capped a career where he came back from cancer to dominate the sport's most prestigious and taxing race.
But Armstrong's last ride as a professional, the closing 144.5km 21st stage into Paris from Corbeil-Essonnes south of the capital, was not without incident.
Wet weather rained on his victory parade. Three of his teammates slipped and crashed negotiating a bend shortly before they crossed the River Seine. Armstrong, riding just behind, braked and skidded but did not fall, putting his right foot to the road to steady himself.
His teammates, wearing special shirts with a band of yellow on the right shoulder, recovered and led him up the Champs-Elysees at the front of the pack.
Organisers then announced that they had stopped the clock because of the slippery conditions.
"It was a victory of courage and panache"
Vinokourov took the honor of winning the stage on the Champs-Elysees, surging ahead of the main pack in a sprint finish. He had been touted as one of Armstrong's main rivals at the start of the Tour on 2 July, but like others was overwhelmed by the Texan.
Vinokourov beat Australia's Bradley McGee and Fabian Cancellara to the line and thrust his arms into the air.
His ride vaulted him to fifth in the overall standings.
"It was a victory of courage and panache," said Vinokourov, who also won a stage in the Alps. "It is magnificent. I don't know what to say."
Ivan Basso of Italy took second in the final overall standings, 4 minutes, 40 seconds behind Armstrong. The 1997 Tour winner, Jan Ullrich, was third, 6:21 back.
In retiring on the winner's podium, against the backdrop of the Arc de Triomphe, Armstrong managed a rare feat in sports - going out on top. He has said that his decision was final and that he was walking away with "absolutely no regrets".
Armstrong's departure begins a new era for the 102-year-old Tour, with no clear successor. The American's riding and inspiring comeback from cancer attracted new fans, especially in the United States, to the quintessentially French race.
Millions turned out each year, cheering, picnicking and sipping wine by the side of the road, to watch him flash past in the race leader's yellow jersey, the famed "maillot jaune".
Cancer survivors, autograph hunters and enamored admirers pushed, shoved, and yelled "Lance! Lance!" outside his bus in the mornings for a smile, a signature, or a word from the champion.
He had bodyguards to keep the crowds at bay, ruffling feathers of cycling purists who sniffed at his Â«AmericanÂ» ways.
Some spectators would shout obscenities or "dope!" - doper. To some, his comeback from cancer and his uphill bursts of speed that left rivals gasping in the Alps and Pyrenees were too good to be true.
Armstrong insisted that he simply trained, worked and prepared harder than anyone. He was drug-tested hundreds of times, in and out of competition, but was never found to have committed any infractions.
"Everybody wants to know what I am on. What am I on? I'm on my bike busting my ass for six hours a day," he said in a commercial for sponsors Nike in 2000.
Winning hearts, race
Armstrong came into this Tour saying he had a dual objective - winning the race and the hearts of French fans.
He was more relaxed, forthcoming and talkative than last year, when the pressure to be the first six-time winner was on.
Some fans hung the Stars and Stripes on barriers that lined the Champs-Elysees on Sunday. Around France, some also urged Armstrong to go for an eighth win next year, holding up placards and daubing their appeals in paint on the road.
But this was the way Armstrong wanted to end his career.
"At some point you turn 34, or you turn 35, the others make a big step up, and when your age catches up, you take a big step down," he said on Saturday after he won the final time trial. "So next could be the year if I continued that I lose that five minutes. We are never going to know."