The British player needed a cortisone injection for the injury ahead of a Monte Carlo Masters semifinal defeat by Rafael Nadal on Saturday, but still traveled to the Catalan capital with hopes of competing.
Murray, seeded No. 2 behind top-ranked Nadal, trained on Tuesday but looked in obvious discomfort before organisers confirmed his exit.
Murray would have played Spain's Juan Carlos Ferrero in the second round after receiving a first-round bye.
Seventh-ranked Tomas Berdych also pulled out earlier Tuesday with a stomach virus.
Meanwhile, French ninth seed Richard Gasquet booked his place in the second round of the ATP Barcelona Open on Tuesday with a 2-6, 7-6 (7/2), 6-4 defeat of Juan Ignacio Chela.
Gasquet, a third-round victim last week in Monte Carlo against Nadal, fought for more than two and a half hours to put out his Argentine opponent, overcoming six potentially costly double-faults against Chela.
World number 17 Gasquet faced 11 break points, saving six, while breaking clay-court specialist Chela four times.
He will next play Slovenian Blaz Kavcic.
Former US Open winner Juan Carlos Ferrero, 2001 champion in Barcelona, made a winning return in his first match since New York last autumn after undergoing surgery on his wrist and knee in October.
The veteran Spaniard reached the second round by beating Belgian Xavier Malisse 6-4, 6-2.
He now has a 26-9 win-loss record in Barcelona, where he has played finals in 2000 (lost to Marat Safin) and 2005 (lost to Nadal).
Japan's Kei Nishikori advanced when Spain's Pere Riba retired injured at 6-2 down after the first set.
The same fate befell this month's Casablanca champion Potito Starace of Italy, who could not go on against Spaniard Daniel Gimeno-Traver with the score 4-6, 6-1, 2-0 in Gimeno-Traver's favour.
Gimeno-Traver will next face five-time champion Nadal, fresh from a seventh consecutive title at Monte Carlo, where he defeated Barcelona fourth seed David Ferrer.
In other results, Croatian Ivan Dodig defeated Frenchman Vincent Millot 6-2, 6-3, while the last remaining German, Simon Greul, eliminated the only American in the singles field with a 6-4, 6-4 defeat of Robert Kendrick.
Results from the Barcelona Open at Real Club de Tenis Barcelona (seedings in parentheses):
Singles
First Round
Richard Gasquet (9), France, def. Juan Ignacio Chela, Argentina, 2-6, 7-6 (2), 6-4.
Daniel Gimeno-Traver, Spain, def. Potito Starace, Italy, 4-6, 6-1, 2-0, retired.
Ivan Dodig, Croatia, def. Vincent Millot, France, 6-2, 6-3.
Simon Greul, Germany, def. Robert Kendrick, United States, 6-4, 6-4.
Kei Nishikori, Japan, def. Pere Riba, Spain, 6-2, 0-0, retired.
Juan Carlos Ferrero, Spain, def. Xavier Malisse, Belgium, 6-4, 6-2.
Carlos Berlocq, Argentina, def. Jarkko Nieminen, Finland, 6-4, 4-6, 6-2.
Feliciano Lopez, Spain, def. Mikhail Kukushkin, Kazakhstan, 6-2, 6-7 (7), 6-4.
Milos Raonic (15), Canada, def. Radek Stepanek, Czech Republic, 6-4, 6-2.
Nikolay Davydenko, Russia, def. Alexandr Dolgopolov (10), Ukraine, 6-4, 7-6 (6). ^Second Round=
Gael Monfils (7), France, def. Robin Haase, Netherlands, 3-6, 7-6 (3), 6-2.
Nicolas Almagro (8), Spain, def. Pablo Andujar, Spain, 7-5, 7-6 (1).