Nibali, the Astana rider who is looking to complete his set of grand tour titles having won the Giro d'Italia and the Vuelta a Espana, attacked in the final climb, a brutal 5.9km ascent to La Planche des Belles Filles, and never looked back.
Thibaut Pinot, of France, took second place 15 seconds back with Spain's Alejandro Valverde in third place 20 seconds off the pace.
Contador, the Tour winner in 2007 and 2009, pulled out after suffering a shinbone fracture following a crash during a descent, organisers said.
Nibali now leads the Australian Richie Porte - he took over as Team Sky leader after 2013 champion Chris Froome crashed out last week - by 2 mins 23 secs. Valverde, of the Movistar team, is third overall, 2:47 off the pace.
Three Frenchmen, Romain Bardet, Tony Gallopin and Pinot, are in fourth, fifth and sixth place overall, with Bardet and Pinot vying for the white jersey for the best under-25 rider. "I am aiming at a top-10 finish [in Paris] and the white jersey will just come by itself," said Pinot.
The American Andrew Talansky, riding for Garmin-Sharp and a podium contender, cracked in the finale and lost more than 10 minutes to drop out of contention.
Today is the Tour's first rest day and it could not come at a better time after yesterday's ordeal. Seven categorised climbs were on the itinerary and riders once again faced torrential rain in the Vosges region. "It was a very, very hard day, Michele Scarponi [his team mate] did an incredible job," said Nibali, who witnessed Contador's crash. "It happened in a descent, the asphalt was not in good condition. He was behind me but then passed me and, three seconds later, he fell off in front of me. It was spectacular; we were [travelling at] around 60kph."
The peloton slowed down but, when it became clear that Contador would not be rejoining the bunch, the pace upped again and the race went on. His shirt and shorts torn, Contador sat on the side of the road to receive treatment from the race doctors, blood dripping from his right knee.
He got back to his bike and was being helped by his Tinkoff-Saxo team-mates but, after climbing the Category 1 Col du Platzerwasel, he got off his bike again in thick fog and stepped into his team car.
"Alberto crashed badly; the crash was violent. I have his shoe with me; it's completely destroyed," said Philippe Mauduit, Contador's sports director. "According to some rumours, his bike was broken but that's not the case. In a fraction of a second, it all fell apart, so we're immensely sad."
A 10-man pack led by Joaquim Rodriguez went ahead early and built a comfortable lead. The Slovak Peter Sagan attacked to collect 20 points at the intermediate sprint, further strengthening his lead in the points classification.
Poland's Michal Kwiatkowski jumped in a counter attacking group led by his Omega Pharma-QuickStep team-mate Tony Martin, winner of Sunday's ninth stage, but he cracked in the end, surrendering the white jersey to Bardet. But Nibali powered away from a group of favourites 3km from the finish and quickly caught Rodriguez and dropped him.
Behind him, Pinot, who lives in the region, went on the attack to claim a handful of seconds on Valverde and Porte as the race for the podium looks wide open, especially after the loss of Contador. "Crashes are part of our job, it's not enough to just be good in the climbs," said Nibali.