A nerve-shredding affair went the distance, as so many ties have in this new-look format, but a final backhand long from Rublev sent Shapovalov and Pospisil leaping into the air and into each other’s arms.
Canada, who had reached the semi-final stage for only the third time, will play either Spain or Great Britain on Sunday.
Shapovalov said: “In terms of what we’ve been doing this week, there’s really no words for it. I don’t think any of us expected that we could get this far.
“Obviously, we knew we have a great team. But you have to have a little bit of luck on your side and just play some ridiculous tennis and play at a ridiculous level. And I think we just absolutely played ridiculous tennis.
“I’m super-stoked to be in the final. It’s one of my dreams, to play in a Davis Cup final. And to be able to bring the country to this position, it’s just a dream come true.”
Both Canada and Russia have only used two players during the competition, with Russia relying on Khachanov and Rublev after the withdrawal through fatigue of Daniil Medvedev.
Canada have benched Shapovalov’s Junior Davis Cup-winning team-mate Felix Auger-Aliassime following an ankle problem and were without Milos Raonic completely because of injury.
The first rubber pitted two of this week’s biggest stars against each other.
Neither Rublev nor Pospisil had lost a singles match, the latter despite being ranked 150, but it was the Russian who kept his record intact with a 6-4 6-4 victory.
That put the pressure on world number 15 Shapovalov against Khachanov and the Canadian number one did not falter, coming from 1-4 down to win the first set and then recovering from 0-40 to serve out the match 6-4 4-6 6-4.
Khachanov and Rublev had defeated Novak Djokovic and Viktor Troicki in a dramatic doubles rubber on Friday, saving three match points, but Pospisil and Shapovalov are the more accomplished players in the format and it showed in the first set.
Rublev and Khachanov hit back to level, though, with Pospisil beginning to look understandably weary.
The 29-year-old, who has had a lot of injury troubles, had his shoulder vigorously massaged in between sets.
Both teams survived hairy moments in the decider but it was Pospisil and Shapovalov who eventually triumphed, coming from 4-2 down in the tie-break and taking their second match point.