Murray, a wildcard at the tournament in North Carolina, was due to face Nick Kyrgios in the first round, but the Australian withdrew on Sunday evening citing a left knee injury.
It left tournament organisers scrambling at short notice to fill the schedule, with lucky loser Rubin – who had just lost a gruelling three-set qualifier to Lucas Pouille – stepping in just hours after that match.
Rubin, who studied in Winston-Salem, kept pace in the first few games, but then the Scot wrapped up a set lead inside 35 minutes, breaking for 4-2 and again for the set.
The second was a swifter affair, Murray breaking the world number 306 three times to wrap up a 6-2 6-0 win inside an hour.
"I didn't know if I was going to play tonight,” said Murray. “They said if I was playing against a qualifier then I wouldn't play and then I drew a lucky loser. It was tricky.
"It was obviously difficult for 45 minutes and then the first couple of games because you've gone over a strategy with your coach about the match you're going to play and then obviously that changes.
"It was my by far the strangest situation I have ever been in before a match. It's pretty rare that you experience something new when you're 17 years into your career.
"Noah was a great replacement for Nick. It was great for the crowd, and I didn't know he went to university here.
“It was just unfortunate he wasn't able to give his best effort. It is a real shame tonight, but it was nice that it was packed.”
A tired Rubin tweeted after the match: “To everyone who came out to support Murray/Kyrgios match, was fun playing in front of you.
“Tried to put on a show, but didn't have much left. Was a brutal day, but this is tennis, and what a weird way to come back. Always at home here at Wake. See ya soon black and gold.'
Murray will go on to face Frances Tiafoe and fellow Brit Dan Evans, seeded third, will face the winner of the match between Lucas Pouille and Feliciano Lopez.
There were also wins for Gilles Simon, Marcos Giron, Mikael Ymer, Soonwoo Kwon and Thiago Monteiro in Winston-Salem, which is the final warm-up event before next week’s US Open.
Meanwhile, Olympic gold medallist Alexander Zverev needed just an hour to take the 17th title of his career at the Western and Southern Open in Cincinnati.
The German drew first blood in the final against Andrey Rublev, breaking the Russian's service for a 1-0 and 3-0 lead in the first set.
Zverev then polished off the first set inside 28 minutes, serving out for 6-2.
The second set started in a similar vein to the first, Zverev breaking Rublev's serve in the first game, and the German broke again for a 4-1 lead.
Rublev got a break back for 5-3 in the second, but lost his serve for the third time in the set as he went down 6-3.