Undeterred by an on-court intruder, Federer beat surprise finalist Soderling 6-1, 7-6 (1), 6-4 on Sunday to complete a career Grand Slam and win his 14th major title, matching Sampras' record.
On his fourth try at Roland Garros, Federer became the sixth man to win all four Grand Slam championships.
"It's maybe my greatest victory, or certainly the one that removes the most pressure off my shoulders," Federer said. "I think that now and until the end of my career, I can really play with my mind at peace, and no longer hear that I've never won Roland Garros."
Midway through the match, a spectator ran onto the court and tried to put a hat on Federer. That only briefly delayed Federer's march to the title.
When the stylish Swiss hit a service winner on championship point, he fell on his knees to the clay that had vexed him for so long, screamed and briefly buried his face in his hands. He was teary by the time he met Soderling at the net, and fans gave Federer a standing ovation as he raised his arms in triumph.
The supportive crowd included Andre Agassi, the most recent man to complete a career Grand Slam when he won at Roland Garros 10 years ago. Agassi presented Federer with the trophy.
"I'm so happy for you, man," Agassi said.
"You're the last man to win all four Grand Slams," Federer said. "Now I can relate to what it really feels like. ... It feels good to be for once on the podium as the winner. It's a magical moment."
Tears ran down Federer's cheeks as the Swiss national anthem played.
"Roger, really, congrats to you," Soderling said. "You really gave me a lesson in how to play tennis today. And to me you're the greatest player in history. So you really deserved to win this title."
Playing in cool, windy weather and occasional rain, Federer raced to a quick lead, sweeping the first four games. Soderling appeared nervous at the start of his first Grand Slam final, and Federer kept him scrambling with penetrating groundstrokes to both corners and an occasional drop shot.
Then came the day's biggest surprise. The match was between points in the second set when a spectator waving a flag climbed through the photographer's pit and onto Federer's side of the court.
Federer backed away toward the backstop, but the fan caught up with him and tried to put a hat on Federer's head. Security personnel seemed slow to react before chasing the man to the other side of the court, and he was tackled, then carried out.
There was silence from the stunned crowd, then a chant of "Ro-ger! Ro-ger!" when the bizarre episode ended. Federer readjusted his headband, Soderling gave him a thumbs-up sign and play resumed.
Soderling's strokes steadied, and he pushed the second set to 6-all. But Federer played a brilliant tiebreaker, hitting aces on all four of his service points, and Soderling could only smile ruefully.
Federer broke again to start the third set and kept that lead the rest of the way. He never lost serve, and despite the difficult conditions, he had more winners than unforced errors -- 41 to 24.
"It's always tough to play Roger," Soderling said. "He really played well today. I had a few small chances in the second set, but overall he played too well for me today."
Federer owed Soderling a thank-you for easing his path by upsetting four-time defending champion Rafael Nadal in the fourth round last Sunday. Nadal beat Federer at Roland Garros the past four years, including three consecutive times in the final.
For Federer, a matchup against the No. 23-seeded Soderling was much more inviting. The Swede had never previously been beyond the third round at a Grand Slam tournament, and he fell to 0-10 against Federer.
"Yesterday, me and my coach were joking," Soderling told Federer during the trophy ceremony. "You've beaten me nine times in a row, and we were joking nobody can beat me 10 times in a row. But we were wrong."
Despite Nadal's surprising departure, Federer's journey to the title wasn't easy. He rallied from a two-set deficit in the fourth round to beat Tommy Haas, and survived another five-setter against Juan Martin del Potro in the semifinals.
Federer won his 14th Grand Slam championship at age 27. Sampras, who never reached a French Open final, was 31 when he won his last major title. Federer will try for No. 15 beginning in two weeks at Wimbledon, which he has won five times.
He has also won the U.S. Open the past five years, and he has three Australian Open titles.
For his latest victory, Federer won $1.5 million. Soderling received $750,000.