Federer said he injured his back in practice on Saturday, but hoped to be fit for the Rome Masters next week in the build-up to the French Open later this month.
“There's no feeling that I can practise so at this point I don't want to take more chances, as I know I won't be fully ready for Wednesday,” said the 17-time Grand Slam champion.
“I want to play it safe, rest up and get ready for Rome, that's the schedule now.”
After shock defeats for top two seeds Agnieszka Radwanska and Angelique Kerber on Sunday, more big names fell leaving just seven of the 16 seeds still standing.
However, Victoria Azarenka extended her winning streak to 16 matches with a comfortable 6-3, 6-2 victory over France's Alize Cornet.
The Belarussian clinched her last two tournaments at Indian Wells and Miami and is the favourite to land her first title in Madrid in the absence of world number one Serena Williams due to flu.
Azarenka raced into a 4-1 first set lead against world number 48 Cornet and, despite a blip dropping serve for the only time in the match for 4-2, broke once more to seal the set 6-3.
The second set was even more straight forward for the two-time Grand Slam champion as two breaks of serve sealed victory in just under 90 minutes on court.
Azarenka will face American qualifier Louisa Chirico in the third round after she stunned 14th seed Ana Ivanovic 5-7, 6-1, 6-3.
Defending champion Petra Kvitova remained on course for a quarter-final showdown with Azarenka with a 6-3, 6-3 win over Russian Elena Vesnina.
The two-time Wimbledon champion reached the semi-finals in Stuttgart a fortnight ago and believes her positive start to the clay-court season is down to her new coach David Kotyza.
“I have a new coach. That's always great to have someone who's helping you and finding a good way of your game and plan,” said Kvitova.
“I feel okay. Importantly is that my body feels okay. I hope that this will kind of continue.”
Kvitova faces Australian Daria Gavrilova in round three after she ousted 12th seed Elina Svitolina 6-2, 7-6 (7/4).
Sloane Stephens failed to build on her win in Charleston last month as she lost to Romanian qualifier Patricia Maria Tig 6-2, 6-3 and Czech 13th seed Karolina Pliskova fell to American Christina McHale 7-6 (7/3), 6-4.
The seeds fared better on the men's side of this joint WTA/ATP event as Richard Gasquet, Milos Raonic and Giles Simon all sealed their place in the second round.
A resurgent Rafael Nadal begins his quest to win a fifth title in Madrid on Tuesday when he faces Russian Andrey Kuznetsov.
Defending champion Andy Murray is also in action on Tuesday against Radek Stepanek or Vasek Pospisil.