Tursunov had defeated Thomaz Bellucci of Brazil in a tough, three-set match in the first round on Tuesday.
Murray, seeded second as the defending champion, hasn't played a match yet in Shanghai, receiving a first-round bye.
Earlier Wednesday, fourth-seeded Jo-Wilfried Tsonga was knocked out by Japan's Kei Nishikori 6-7 (1), 6-4, 6-4. The Frenchman fought off two match points with aces before hitting a backhand long to hand Nishikori the win.
The loss will hurt Tsonga's chances of claiming one of the four remaining spots in the season-ending ATP World Tour Finals in London. He is eighth in the standings, the last qualifying spot.
In another second-round match, third-seeded David Ferrer of Spain defeated Canadian Milos Raonic 7-5, 7-6 (7). Raonic, who has now lost to Ferrer three times this year, had a set point in the tiebreaker, but couldn't convert.
Garcia-Lopez won his last meeting with Nadal, in the semifinals of the Thailand Open in 2010, Nadal's first tournament after capturing the U.S. Open.
"It was a tough loss last year in Bangkok," Nadal said. "Less painful because I came after winning the U.S. Open, but it probably was the more unbelievable loss in my career against him last year because I never had as many chances as I had in that match, and I lost. It was a little bit in my mind today in the break points."
After losing the first set and going down a break in the second set Wednesday, Garcia-Lopez started hitting drop shots to bring Nadal to the net.
He broke Nadal's serve to level the score at 2-2, but Nadal immediately broke back when he got to a drop shot, chased down a lob and stabbed a backhand volley for a winner.
Nadal's only complaint afterward was with the balls being used in Shanghai, which he said are much faster than those at the Japan Open in Tokyo last week. He said the same balls should be used when there are several tournaments on the same surface in a row, such as the hard-court tournaments in Thailand, Japan and China on the tour's autumn Asian swing.
"Something must change because is too dangerous for the shoulders," he said. "That's something that, in my opinion, can change. In my opinion, not difficult to change."
Murray's draw has opened up with the losses of Tsonga and fifth-seeded Mardy Fish, who fell to Australian Bernard Tomic on Tuesday. The highest seeded player remaining in his half of the draw is No. 8 Gilles Simon of France.
American teenager Ryan Harrison, who upset 11th-seeded Viktor Troicki in the first round, lost to fellow qualifier Matthew Ebden of Australia, 6-4, 6-2. Ebden, ranked 124th, had only won eight matches on the ATP tour coming into Shanghai.
In other second-round matches, Colombia's Santiago Giraldo edged 14th-seeded Jurgen Melzer of Austria, 4-6, 6-4, 7-6 (5), and 12th-seeded Alexandr Dolgopolov of Ukraine defeated qualifier Albert Ramos of Spain, 5-7, 6-3, 6-2.