"So sorry for my fans, those here at Miami and those around the world," the Spanish world number two wrote on his Twitter account. "My knee won't let me play today."
It's a blow for Nadal with the start of the clay court season looming.
Nadal is playing in only his fourth tournament of 2012 having fallen in the semi-finals in Doha, finished runner-up to Novak Djokovic in January's Australian Open final and making the Indian Wells Masters semi-finals last week.
His last title came at the French Open last year.
Despite his drought, Nadal said he was encouraged by his results in his few starts this year.
"First three tournaments of the year I played final and two semi-finals in very difficult tournaments, so that's the positive thing that stays on my mind, playing good tennis.
"In general, I am very happy almost about everything. My schedule is going to be the same: Monte-Carlo, Barcelona, first two (clay court) tournaments."
Nadal said his left knee had been bothering him since the tournament started, with the discomfort "growing worse every day".
He needed almost three hours to battle past France's Jo-Wilfried Tsonga in the quarter-finals on Wednesday, and said he knew that recovering from that to play on Friday would be "complicated".
"But I always believe that the things can improve," he said. "So I waited until today in the morning. I did a lot of treatment yesterday ... but I am not ready to compete today.
"I cannot go on court and lie to everybody."
Although Nadal has been plagued by knee tendinitis in the past, he was optimistic the current ailment wasn't serious, and said his knees are actually in better shape than they were several years ago.
"Just go to the doctor hopefully tomorrow, and hopefully in a few days, with a few days off and with the right treatment, I will be in the right condition to start to practice on the clay."
However, Nadal was adamant that his decision to withdraw wasn't taken with the clay court season -- and the French Open -- in mind, but because he knew he wouldn't be able to play properly against Murray.
"Yes, I want to arrive to the clay court with the right conditions, but I want to arrive here with the right conditions," he said. "That's why I rested all February.
"Clay court season is there in two weeks, but this tournament is very important for me, and I feel very sad to have to go out before a beautiful match for me, semi-finals against Andy."
Murray, who won the Miami title in 2009, awaits the winner of the semi-final between world number one Djokovic and Juan Monaco of Argentina, the 21st seed who ousted Andy Roddick and eighth-seeded Mardy Fish en route to the semis.
"We are disappointed that Rafa has been forced to withdraw from the tournament but the health of the players always needs to be the number one priority," said Adam Barrett, Sony Ericsson Open Tournament Director.
Rafael Nadal pulls out of Miami Masters due to knee injury
Advertisement