World number seven Rublev had never won so much as a set in four previous losses to his compatriot, currently ranked second in the world and the top seed in the prestigious hardcourt tournament that serves as a tuneup for the US Open.
In the women's draw, world number one Ashleigh Barty reached her sixth final of the season with a 6-2, 7-5 victory over Angelique Kerber.
The top-seeded Aussie, who has led the rankings for the past 82 weeks, needed an hour and a quarter to move into Sunday's title match, surpassing her semi-final showing from 2019.
Barty will play for the trophy on Sunday against Swiss wild card Jil Teichmann -- who beat Czech fifth seed Karolina Pliskova 6-2, 6-4 to reach a fourth career final but her first at the elite Masters 1000 level.
The 24-year-old ranked 76th in the world owns 250-level trophies on clay from Palermo and Prague two years ago.
She needed 84 minutes to continue an outstanding week in which she beat Naomi Osaka in the third round and Olympic gold medallist compatriot Belinda Bencic in the quarters.
After beating fourth-ranked Pliskova she stands 4-0 this season against top 10 players.
Medvedev, who was seeking a Canada-US Masters double after lifting the title in Toronto at the weekend, required three separate medical timeouts during his loss to Rublev.
He received treatment on his left hand after he hit an on-court camera during a rally and also had treatment on his right forearm and right thigh during a match played in oppressive 31-degree (C) heat.
Rublev re-adjusted after losing the opening set, hung on during his opponent's injury dramas and heated discussion with the umpire on camera placement and finally got his chances in the concluding set after two and a quarter hours.
He'll play for the title against the winner of Saturday's second semi-final between second seed Stefanos Tsitsipas and third-seeded Olympic champion Alexander Zverev.
"I don't know how I turned it around," Rublev said. "Every point was so tight, the match was so intense -- it was exactly like a chess game."
Rublev said he needed to choose his moments as he closed in on success.
"He won't ever give you a chance so I had to find the right time to make him run. "This win will give me confidence, knowing that I can compete against him, but I still have many things to improve."
Barty powers through
Against Kerber, Barty increased her lead in the series between multiple Grand Slam winners to 4-2 as she duplicated a Wimbledon semi-final victory from last month.
Barty produced a dozen aces and broke Kerber five times. Her 39 match wins this year nudged her one ahead of Aryna Sabalenka on the WTA list.
The top seed had to call upon some strategy to see her through to the win. The pair twice traded breaks in the second set, with Barty finally getting the deciding fifth break in the final game.
"It's been a nice week of building momentum," said Barty, who fired 29 winners to Kerber's 16. "To be in another match playing for a title is really exciting, really cool.
"I'm playing well at the moment, executing game plans well. I feel I'm moving well, and I've got control of the ball. That's all I can ask of myself."
Kerber said that, finally, she was out-played.
"She started playing really aggressive, and I was just trying to find my rhythm," the German said. "I tried to come back in the second set. "I had my chances, but she played really well in important moments and closed the match her way."