Contador fell heavily on his right knee with under 100km to go but he did get back on his bike and ride further before having to abandon the race.
The Spaniard lost over four minutes on the peloton because of the crash and after getting that time down to three minutes, he thanked his teammates and decided to stop.
Contador now joins defending champion Chris Froome who crashed out on stage five, leaving Nibali well and truly in the driving seat to win the Tour.
The 31-year-old will now concentrate on getting his knee fixed and will hope to race in the Vuelta a Espana.
A Tinkoff-Saxo statement said: "Contador crashed on the descent of Petit Ballon and injured his knee. After receiving medical care and a new bike, Alberto was determined to get back on the bike and quickly continued in an attempt to close the gap to the peloton.
"Tinkoff-Saxo’s attempt to bring Alberto back in the peloton was made difficult by the mountainous terrain and the high speed up front. After 20km of chasing, Alberto was not able to pedal and abandoned the race due to his knee injury."
After losing the yellow jersey to Tony Gallaopin, Nibali took it back from him in impressive style by finishing alone at the summit finish of stage 10.
The Italian attacked with around three km to go and broke clear with 750 metres to win his second stage of the 2014 race.
Thibaut Pinot crossed the line in second with Alejandro Valverde finishing in third.
Nibali said, according to Sky Sports: “It was huge work for my team, but it was definitely big victory for me and I am delighted by it. It has been a really good day.”
Stage ten result
1 Vincenzo Nibali (Ita) Astana, 4:27:26
2 Thibaut Pinot (Fra) FDJ.fr, +15secs
3 Alejandro Valverde (Spa) Movistar, +20
4 Jean-Christophe Peraud (Fra) Ag2r-La Mondiale, same time
5 Romain Bardet (Fra) Ag2r-La Mondiale, +22
6 Tejay van Garderen (USA) BMC Racing, +22
7 Richie Porte (Aus) Team Sky, +25
8 Leopold Konig (Cze) NetApp-Endura, +50
9 Joaquim Rodriguez (Spa) Katusha, +52
10 Mikel Nieve (Spa) Team Sky, +54
1 Vincenzo Nibali (Ita) Astana, 42:3:38
2 Richie Porte (Aus) Team Sky, +2:23
3 Alejandro Valverde (Spa) Movistar, +2:47
4 Romain Bardet (Fra) Ag2r-La Mondiale, +3:01
5 Tony Gallopin (Fra) Lotto Belisol, +3:12
6 Thibaut Pinot (Fra) FDJ.fr, +3:47
7 Tejay Van Garderen (USA) BMC Racing, +3:56
8 Jean-Christophe Peraud (Fra) Ag2r-La Mondiale, +3:57
9 Rui Costa (Por) Lampre-Merida, +3:58
10 Bauke Mollema (Ned) Belkin, +4:08
Write for GiveMeSport! Sign-up to the GMS Writing Academy here: http://gms.to/1a2u3KU