On the roads of one of his favourite hunting grounds, the Tour of Lombardy, the double Giro champion attacked during a steep climb near the end to pull away from Slovenian Roglic, who lost 40 seconds after crashing in the descent towards the finish.
The 232-km stage from Ivrea was won by breakaway rider Dario Cataldo of Italy but the real action was just behind as Roglic, riding a team mate's bike following a mechanical problem, could not follow Nibali's attack in the ascent up to the Civiglio.
Ecuador's Richard Carapaz retained the overall lead and now appears as a strong contender for the title. He matched the Sicilian's pace and finished with him after being distanced for a brief amount of time in the descent.
Briton Simon Yates, who had lost considerable ground in last Sunday's individual time trial, looked fresh as he attacked three times in the stage to end up with Nibali and Carapaz.
Roglic, however, was the big loser on the day, going straight into a safety railguard in the descent from the Civiglio.
The Jumbo-Visma rider's lead over Nibali and his self-confidence are now dented.
Overall, Carapaz of the Movistar team leads Roglic by 47 seconds and Nibali by 1:47 going into the second rest day on Monday.
Tuesday's 16th stage is a potential turning point in the race as it features the gruelling ascent of the Mortirolo pass, even if the climb up the equally demanding Gavia pass has been cancelled because of avalanche risks.
(Writing by Julien Pretot; Editing by Pritha Sarkar)