The Venezuelan was part of an original 15-man escape group before he attacked on the final climb of the day and held off the chasers over the final 35 kilometres.
He finished 1:10 ahead of four other members of that break, Adriano Malori (Lampre-ISD), Michal Golas (Omega Pharma-Quick Step), Alexandr Dyachenko (Astana) and Cesare Benedetti (NetApp).
Hesjedal's Garmin team-mates reduced the deficit considerably in the closing stages but narrowly failed in their quest to retain the maglia rosa with overnight leader Ramunas Navardauskas way back after losing considerable time on the first hilly stage of the race.
It was Daryl Impey (Orica-GreenEDGE) who led the peloton over the line in sixth, 1:51 behind the stage winner.
The 210km route from Urbino featured four classified mountains and saw the eventual first five plus Manuel Belletti (AG2R-LaMondiale), Alfredo Balloni (Farnese Vini-Selle Italia), Dominique Rollin (FDJ-BigMat), Jack Bauer (Garmin-Barracuda), Aliaksandr Kuchynski (Katusha), Jens Keukeleire (Orica-GreenEdge), Gatis Smukulis (Katusha), Pablo Lastras (Movistar), Dennis Van Winden (Rabobank) and Luke Roberts (Saxo Bank) go clear after 24km.
They built up a lead of 8:36 as they travelled through the Macerata and Fermano Apennine hills with short and sharp ascents followed by technical descents.
Lastras attacked on the category two climb of the Passo della Cappella with 92km remaining but it was Rubiano who was first at the summit and the Movistar rider crashed on the descent, chasing the leader, and was forced to abandon the race.
That climb, with ramps of 16%, saw the escape group whittled down to eight - Rubiano, Malori, Dyachenko, Smukulis, Bauer, Golas, Roberts and Benedetti - and a push from the Liquigas team saw their lead reduced to 4:25 with 75km left.
But the Italian team were not supported in their chase and the lead increased on the run-in to the cat-three climb of the Montelupone before Rubiano made his move on the similarly graded ascent of the Montegranaro.
The Montegranaro's 18% gradient saw Smukulis, Bauer and Roberts - the best-placed on GC of the escape group - distanced.
And Rubiano extended his lead over the chase quartet on the run-in to the line to record by far the biggest win of the 27-year-old from Bogota's career.
The stage took its toll, with Garmin sprinter Tyler Farrar, former world champion Thor Hushovd (BMC) and Romain Feillu (Vacansoleil) all forced to abandon.