Eight games into the match Wednesday, Roddick had decided it was time to quit.
He retired with a strained left hamstring, allowing Murray to advance to the semifinals of the Sony Ericsson Open.
Three-time champion Serena Williams also reached the semifinals, beating No. 8-seeded Nicole Vaidisova 6-1, 6-4.
Williams will play for the fourth day in a row tonight when she faces No. 14 Shahar Peer. A 19-year-old corporal in the Israeli Army, Peer nearly pulled off an upset against Williams in the quarterfinals of the Australian Open in January, losing the third set 8-6.
Roddick said his injury occurred while lunging for a shot in the fifth game. He called it quits trailing 5-3.
"I just kind of jarred something at first," he said. "More and more it started becoming like a sharp pain, and then I started feeling it even when I was just kind of cruising around the court, not even in points. It was steadily getting worse, which isn't a good sign."
An MRI exam revealed a grade-one strain - the least severe kind, with grade three the worst. Still, the injury leaves in doubt Roddick's availability for the U.S. Davis Cup team's match against Spain on April 6-8.
"It's a hamstring - it could take three days, or three weeks," U.S. captain Pat McEnroe said. "We're going to do everything we can to get him ready. There's no tear, that's the main thing."
Roddick said he thought of Davis Cup the moment he hurt himself.
"It's disappointing," he said. "Right now I just want to focus on getting better."
Roddick failed to react to several of Murray's shots, took a medical timeout at 4-3 and left the court.
"It's hard to concentrate, because you don't know how bad the injury is," Murray said. "You just have to try to get the ball back and make them play."
Roddick returned to play six more points but appeared hobbled. On the final rally, he hit a half-volley at the net. When Murray pulled a backhand crosscourt for a winner, Roddick didn't move - or even look at the ball.
"Anybody would rather get off the court quicker than longer," Murray said. "But I wish it was in normal circumstances."
Roddick's chances of winning his second Key Biscayne title seemed good when chief nemesis Roger Federer lost Tuesday to Guillermo Canas. Instead, he retired from the tournament for the second time in three years.
Murray's opponent Friday will be the winner of the match Wednesday night between second-seeded Rafael Nadal and No. 10 Novak Djokovic.
The other women's semifinal today will be between top-ranked Justine Henin and Anna Chakvetadze. With second-ranked Maria Sharapova's loss Wednesday to Williams, Henin is assured of remaining No. 1 next week.