Aware he had a chance to overcome Joaquin Rodriguez's 31-second overall lead in Sunday's final stage, Hesjedal broke out onto the streets of Milan determined to keep victory from slipping away.
Only near the end did he find out he would become the first Canadian to win one of cycling's three major tour races.
"Nothing anyone could have said to me could have changed how hard I rode," he said.
Hesjedal took 34 minutes 15 seconds to complete Sunday's 28.2-kilometre individual time trial in sixth — 20 places ahead of his Spanish rival. His 16-second margin of victory was the second closest in Giro history.
"It's just been an unreal experience from day one, what the team was able to do. It's unbelievable," said the Victoria native, who finished the race in 91 hours 39 minutes two seconds.
"This is incredible. It's a dream come true."
Like the rest of the riders, Hesjedal had been through a demanding mountain ride to the top of the Stelvio Pass in northern Italy on Saturday.
"Yesterday was extremely hard," he said. "I got through it and I knew as I was on the helicopter descending into Milan that I still had a shot. This morning I just felt incredible on my bike and I knew I could do it."
Though he hadn't taken his victory chances seriously before the race, Hesjedal's thinking started to change after he first wore the overall leader's pink jersey in Stage 7, following a fifth-placed finish.
"I never thought 'I'm going to win,'" he said. "I was always just focused on having a good ride and I knew that would put me up there. The day I pulled on the jersey for the first time I knew I was good and could accomplish something great and that drove me harder."
The 31-year-old Hesjedal became only the third non-Italian to win the Giro in the past 15 years.
Hesjedal and Rodriguez were the last two riders to start on Sunday. Although Rodriguez had worn the pink jersey for 10 days over the course of the race and gave it his all in the time trial, he ended the stage in 35:02.
"I believed it until the end and so it's almost harder for me," said Rodriguez. "It's only now, with hindsight, that you see the mistakes. Maybe we should have distanced Ryder in the first week. But it went how it went and Ryder won.
"He was the strongest in the three weeks. I did my best and I don't have any regrets."
Marco Pinotti won the final stage in 33:06, 39 seconds ahead of Geraint Thomas.
Thomas De Gendt, who rode to a memorable solo win atop the Stelvio Pass on Saturday, put in another good performance to finish third overall, 1:39 behind Hesjedal. The Belgian had been 5:40 behind Rodriguez at the start of stage 20.
Defending champion Michele Scarponi was fourth. It is the first time since 1995 that an Italian has not finished on the podium in the Giro, one of the sport's top three races along with the Tour de France and the Spanish Vuelta. Two-time Giro winner Ivan Basso was fifth, 3:44 off the pace.
Prime Minister Stephen Harper was among the Canadians celebrating Hesjedal's victory.
"This remarkable win in one of bicycle racing's most gruelling competitions is a testimony to Mr. Hesjedal's training, endurance, skill and competitive spirit," Harper said in a statement.
The Canadian Olympic Committee echoed the Prime Minister's sentiments.
"Congratulations to Ryder on this momentous achievement," said COC president Marcel Aubut in a statement. "This is another example of a Canadian athlete giving his everything and achieving unprecedented success against the world's best competition.
"He has made his country proud and we celebrate this magnificent performance."
On Twitter, seven-time Tour de France winner Lance Armstrong praised Hesjedal's achievement.
"Congratulations to @ryder_hesjedal on his incredible victory in the #giro. Gotta love it when the best man wins," tweeted Armstrong.
Toronto cyclist Michael Barry added: "Emotional moment watching the Canadian flags go up in Milan and hearing the anthem. Congrats @ryder_hesjedal You've inspired us all."
Svein Tuft of Langley, B.C., capped a tough race with a ninth-place result on the final stage to finish 148th overall.
Tuft's GreenEdge teammate Christian Meier of Sussex, N.B., was 135th overall after finishing 150th in the time trial.
Hesjedal found out in November he would lead the Garmin-Barracuda team into the Giro. Despite a seventh-place overall finish at the 2010 Tour de France, he hadn't considered that he might be the designated leader ahead of teammate Christian Vande Velde.
"When they told me that, my first reaction was I hadn't had that in my mind. But the first thing I thought of was 'Well that's a huge opportunity and a huge compliment to be selected.'
"I just worked for it every day and we put a plan together and I did what I thought that I needed to do. I couldn't be more happy."
From here, Hesjedal and his team will take time to consider whether he participates in the Tour de France after a demanding three weeks in Italy. Canada also has one yet-too-be-filled cycling spot available for the London Olympics.
But neither the Tour nor the Olympics were on Hesjedal's mind Sunday. He was still trying to grasp winning the Giro, and just how close he came to losing it.
"Who would have thought it would be that close after three weeks? That's what makes it exciting."
— With files from The Associated Press.
Also on HuffPost