The Russian qualifier broke Ferrer's serve three times on his way to a 7-5 win in a tight opening set and, though Ferrer fought back in the second, Tursunov stormed through the final set to complete a shock 7-5 3-6 6-1 win in just under two hours.
Second seed Nadal had no such problems, disposing of Carlos Berlocq 6-4 6-2.
Following a first-round bye, the 11-time grand slam winner was kept on court for less than 90 minutes, breaking serve four times to keep his bid for an eighth Barcelona title on track.
Nadal told atpworldtour.com: "The conditions today [Wednesday] weren't comfortable. There was a very changeable wind that made it difficult to play at a high level. The most important thing is to accept the situation and move forward."
There was further cheer for the home crowd as Tommy Robredo and Albert Ramos both produced upset wins over seeded players.
Robredo won 7-5 6-1 against 14th seed Grigor Dimitrov while Poland's Jerzy Janowicz, seeded ninth, won the first set but went on to lose 4-6 6-2 6-3 to Ramos.
Two seeded home players, Nicolas Almagro and Marcel Granollers, progressed in straight sets.
Almagro won 6-1 7-5 against Croatia's Ivan Dodig while 15th-seeded Granollers beat Blaz Kavcic of Slovenia 6-3 6-1.
There were straight-sets wins for fifth and seventh seeds Milos Raonic and Juan Monaco against Edouard Roger-Vasselin and Bernard Tomic respectively, Monaco dropping just two games.
Slovakia's Martin Klizan dispatched wild card Albert Montanes 6-3 6-4 while Benoit Paire, seeded two spots below Klizan at 13, beat another unseeded Spaniard in Pablo Andujar 6-4 5-7 6-3.