Boonen, the world champion and race favourite, claimed second place after race-judges disqualified the second, third, and fourth finishers, Leif Hoste (Discovery), Peter Van Petegem (Davitamon Lotto), and Vladimir Gusev (Discovery), for passing a closed train crossing ten kilometres from the finish line.
Belgium's Hoste and Van Petegem finished behind Cancellara and well ahead of Boonen, but no one joined the 25-year-old winner on the podium as he collected what was greatest trophy of his young career while the race jury conferred over the bizarre turn of events.
Tour of Turkey
Cavendish claims stage hat-trick at Tour of Turkey after huge crash
Cancellara essentially won the Queen of Classics after pulling away with
Gusev at the historic Carrefour de L'Arbre cobblestone section.
Gusev tried to keep pace with the Swiss rider on the breakaway, but Cancellara, who finished fourth at Paris-Roubaix and won the Tour de France prologue in 2004, was simply too strong.
He easily shed the Russian, who was forced to give chase with the two Belgian riders for the final 15 kilometres.
"I really gave it my all, exactly as I would if had been a time-trial," Cancellara said after the victory. "It felt like my legs were stronger than they've ever been before, but I definitely won this race with my head."
Cancellara said he knew that he could beat Boonen, who was largely expected to complete a historic Tour of Flanders-Paris-Roubaix double-victory for the second straight year after easily winning the Ronde in Belgium last week.
Instead the CSC time-trial specialist became only the second Swiss rider to win Paris-Roubaix, joining Henri Sutter, who won in 1923.
"I knew I had to finish on my own to have a chance of winning," Cancellara said. "I knew I needed to use my head and attack at the right time.
"I saw on one of the cobbled sectors that Tom was not as strong so I decided to give it a try. I won with my head as much as my legs.
"I don't know when a Swiss last won here but it must have been a long time ago," he added.
Boonen, who stopped at the train crossing just as the locomotive passed, was surprised that such a thing could happen so close to the end of such a big race.
"The organisers should have stopped the guys at the level crossing," the leader of the ProTour standings told reporters.
"It was kind of odd to sit there watching a train ride past, birds fly and you're 10 kilometres from the finish of Paris-Roubaix."
Cancellara clearly deserved the victory, however, and Boonen acknowledged as much.
"When Fabian and Gusev attacked I was waiting to jump across but I couldn't," Boonen said. "That's when I lost my speed. That's the moment when I cracked.
"He (Cancellara) was the strongest guy in the race."
Discovery experienced one of its worst days in a long time, as, in addition to the two disqualifications, American favourite George Hincapie failed to finish the race after a terrible crash.
Hincape flew off of his bike after his handlebars came loose at the Mons-en-Pévèle, one of the hardest of 27 cobbled sectors on the day.
After the crash, last year's second place finisher lay on the ground in pain and was subsequently forced to abandon the race due to a collarbone injury.
Italian Alessandro Ballan was awarded third place thanks to the disqualifications.
"Excited and a little bit nervous" - Jakobsen ahead of cycling return
Tirreno - Adriatico
Alaphilippe takes Stage 2 after stunning finish at Tirreno-Adriatico