The former world number one was set to play South African Lloyd Harris in the first round of the Masters 1000 tournament, which begins on Wednesday.
Murray is hoping the injury will not keep him off court for long and revealed he developed pain in his groin while sleeping on Friday night.
The 33-year-old told the Miami Herald: "I had no issues while training, felt fine, did some gym work Friday, no problem, and then I woke up about 3am, felt pain in the groin - not on the side I had my surgery - and when I got out of bed I struggled quite a bit to walk."
Murray, the champion in Miami in 2009 and 2013, had been awarded a wildcard for the tournament, where he hoped to continue his latest comeback following more injury problems last year and a bout of coronavirus that ruled him out of the Australian Open.
He continued: "I have no idea what I did. It's one of those freak things. Each day it has gotten progressively better, but it's not enough. I have not practised since Friday.
"I am really gutted. This is a place I have done so much training over the years. It's like my second home. Last time I played here was 2016 and so much has happened.
"Last year, the day before I was supposed to travel here Covid stopped the tennis tour. Miami's been a place that has given me a lot, but this just wasn't meant to be."