Former world and Olympic time trial champion Cancellara finished ahead of Germany's Tony Martin on the hilly individual time trial starting and finishing in Tarazona, with Italy's Domenico Pozzovivo third and Nibali fourth.
Cancellara said afterward: “I’m happy that is over.
"It was a very hard parcours that was not perfect for a specialist, but I said to myself that I needed to do my race at my own pace and just find the right rhythm for myself.”
The 39km/24.2mi course in Tarazona featured a category 3 summit half way through route.
“The uphill section was very rough especially with the wind. That caused a lot of disruption of my rhythm,” said the Swiss rider.
“Plus yesterday was the rest day so you never know how your body will respond on the day after and I’ve put in a lot of work in the first ten days of the Vuelta working for Chris Horner.”
Nibali regained the overall lead he had held earlier in the race, with Ireland's Nicolas Roche second.
Stung by a wasp during a training session on Tuesday, Nibali, who won the Giro d'Italia in May and the 2010 Tour of Spain , said had no way of knowing how much the sting would affect his ride.
"I'm not sure, When I woke up this morning I felt terrible and little by little it's getting better now," Nibali told reporters, wearing dark glasses to protect his red and swollen eyes.
"I'm just going to defend the lead day by day, not thinking too far ahead. There's still five really big mountain stages to come."
He named Spaniards Valverde and Joaquim Rodriguez, second and third in the 2012 Vuelta, as his most dangerous rivals.
The race finishes on September 15 in Madrid.
Stage 11 Results
1. Fabian Cancellara (Switzerland / RadioShack) 51:00"
2. Tony Martin (Germany / Omega Pharma - Quick-Step) +37"
3. Domenico Pozzovivo (Italy / AG2R) +1:24"
4. Vincenzo Nibali (Italy / Astana) +1:25"
5. Dario Cataldo (Italy / Team Sky) +1:41"
1. Vincenzo Nibali (Italy / Astana) 41:22:22"
2. Nicolas Roche (Ireland / Saxo - Tinkoff) +33"
3. Alejandro Valverde (Spain / Movistar) +46"
4. Chris Horner (U.S. / RadioShack) +46"
5. Joaquim Rodriguez (Spain / Katusha) +2:33"
6. Domenico Pozzovivo (Italy / AG2R) +2:44"
7. Ivan Basso (Italy / Cannondale) +2:55"
8. Thibaut Pinot (France / FDJ.fr) +3:35"
9. Rafal Majka (Poland / Saxo - Tinkoff) +3:46"
10. Daniel Moreno (Spain / Katusha) +3:56"
- Sports & Recreation
- Vincenzo Nibali
- Fabian Cancellara
- Domenico Pozzovivo