"Sadly, I won't be able to defend my title in Miami this week," Djokovic said in a Facebook posting.
"My doctor has strongly advised against play because my elbow injury, that I keep carrying on for months, got worse in the past week. I will do everything in my power to recover and do all the necessary therapy to be able to return on court as soon as possible."
Djokovic joins world number one Murray on the sidelines for the elite hard court tournament. Murray pulled out Saturday, also with an elbow injury.
Even as Murray withdrew, there were reports that Djokovic was seeing a doctor in Monte Carlo about elbow trouble after falling in the fourth round to 16th-ranked Nick Kyrgios at the Indian Wells Masters.
Djokovic's loss to Kyrgios was his second in as many weeks to the Australian, who also upset him in the quarter-finals at Acapulco.
"Believe me, it is as shocking to me as it is to you," Djokovic told his fans on Facebook.
"I had incredible run in Miami, I won there my first Masters tournament and started my campaign towards the top of the world rankings. No wonder they say that in sport the biggest and most painful defeats come from injuries, and not from opponents.
"I am lucky that throughout my career I didn't have many injuries, but I guess that all that I've been through physically in the past so many years did leave a mark on my body."
Djokovic, a 12-time Grand Slam champion, announced the move on Twitter, saying, "I apologize to my fans and ppl who purchased tickets to watch me play live at @MiamiOpen. Sadly, I'm injured and won't be able to compete."
"We wish a quick recovery to our champion," tournament organizers tweeted.
Not only are the world's top two men missing from the Miami event, the biggest name in the women's game, Serena Williams, will miss the Florida tournament with the knee trouble that also caused her to opt out of Indian Wells.
The tournament will, however, have the women's world number one, with Germany's Angelique Kerber poised to return to the summit on Monday despite a fourth-round exit at Indian Wells because of Williams's inactivity.
Kyrgios's triumph over Djokovic ended the Serb's 19-match winning streak at Indian Wells, where he had won the last three titles to go with those he took in 2008 and 2011.
Djokovic's withdrawal from Miami is just the latest setback for a player who endured a drop in form after completing the career Grand Slam with a long-sought French Open victory last year.
He relinquished his Wimbledon and US Open titles and was shocked in the first round of the Rio Olympics by Juan Martin del Potro, losing his world number one ranking to Murray along the way.
Although he opened 2017 on a promising note with a title in Doha, he slumped to a second-round exit at the Australian Open, and didn't play again until Acapulco.