A former junior world and under-23 world champion, who rides for Bahrain-Merida, finished the 244-kilometre stage in Gualdo Tadino ahead of German Nico Denz.
This is the second Grand Tour stage victory for the 23-year-old after winning a stage of La Vuelta, the Tour of Spain, last year for UAE Emirates.
Mohorič sped up for his stage win 39 kilometres from the finish line in response to an attack by Italy's Davide Villela. They soon caught up with Italian Marco Frapporti at the forefront.
After escaping on the last descent, Mohorič was caught up by Villela and Denz 18.4 kilometres before the finish line. Villela then fell behind, while Mohorič and Denz headed for the finish on their own.
Mohorič was the first to enter the final kilometre, waiting for Denz to attack and accelerate, however, the German no longer had enough strength.
Ireland's Sam Bennett finished third.