Riding for professional team Mitchelton-Scott, the South African took the lead on the penultimate leg of the Tour Down Under, and he went on to finish with the main peloton on Sunday's sixth and final stage.
Sunday's final stage will be held over a total of 90 kilometers (56 miles) on a circuit in the streets of Adelaide.
There were 16 seconds of time bonuses available Sunday - three seconds from each of two intermediate sprints and 10 seconds to the stage-winner. "And when I saw Jay just in front of us, I thought there goes the podium if I don't catch them".
"I tell you what that was the hardest one to win so far", Porte said".More news: Manchester United set to complete signing of Alexis Sanchez
"The finish was pretty hectic".
He said the win, combined with Nicholas Dlamini's effort in taking the King of the Mountain title, was a boost for South African cycling. Dlamini, on his World Tour debut, took part in all the major breaks in the early stages of the tour during which temperatures sometimes reached 45 degrees Celsius (113 Fahrenheit).
Impey secured the biggest win of his career when he finished safely in the peloton behind stage victor Andre Greipel, who beat Impey's Mitchelton-SCOTT teammate Caleb Ewan with a lunge to the finish line.
Tom Jelte Slagter (Dimension Data), another former victor of the race, completed the final overall podium in third.More news: Amazon increases its monthly Prime membership rate to $12.99
Bidding to become the first rider to win the Tour Down Under in consecutive years, Porte took out the grueling 151.5-kilometer (94-mile) stage from McLaren Vale to the summit of Willunga Hill, which normally decides the Tour victor, when he crossed the finish line eight seconds ahead of Impey.
Porte staked his claim for victory on the fifth stage but couldn't shake Impey on the climb to the summit of Willunga Hill and entered the final stage with little realistic chance of back-to-back wins.
German sprint ace Andre Greipel has caught young Australian star Caleb Ewan on the line again at the Tour Down Under.
As always in the last stage, the sprinters' teams made sure it would come down to a bunch finish. Ewan was second, Sagan was third and Peter Bauhaus of Germany fourth.More news: The Best Signs at the 45th Annual March for Life
But the margin left the two riders tied for the lead with the same overall time, with Impey awarded the leader's ochre jersey on a count back.