The big-serving fifth seed last played at January's Australian Open, where he was eliminated in the second round.
"I'm really sorry to say I've had to withdraw from the (tournament)," he wrote on Twitter.
It's been great spending some time in Indian Wells at the tournament and seeing the fans again. Thanks for the nice messages too. I am still working to get my elbow better and can't wait to be back soon.
Anderson has been replaced by 19-year-old Serb Miomir Kecmanovic, who will face Maximilian Marterer in the second on Saturday.