Scores were locked at 20-all in the final minute on Wednesday when Blake Ferguson tiptoed the sideline, then found Tedesco for his second try of the night.
It came after Queensland forward Josh Papalii crossed in the 77th minute and debutant Ethan Lowe nailed a pressure conversion to level the game.
The dramatic finish ended a run of seven straight defeats in Origin deciders for the Blues, dating back to the start of the Maroons' dynasty in 2006.
It is also Mitchell Pearce's first series win over Queensland in eight attempts.
NSW appeared headed for a comfortable finish when Tedesco and Damien Cook broke an 8-all deadlock with tries in the space of nine minutes.
However the horrors of series past seemed to return after Queensland scored twice in the final eight minutes through Josh McGuire and Papalii.
When Lowe's conversion sailed through, Origin was seemingly set for its first golden point contest in front of a sellout 82,565 crowd at ANZ Stadium in Australia.
But Tedesco, who finished the night with a game-high 222 metres and 10 tackle busts, turned hero with his game-winning four-pointer.
Tedesco, named player of the series, turned the game three times, beginning with a 65-metre kick return in the 34th minute to set up the Blues' first try.
It came after the Maroons' strong start that debutant Corey Norman turned into points, forcing a line dropout and then grubbering for Felise Kaufusi to score.
More Maroons pressure resulted in a penalty goal - one of 12 infringements ruled by the referees in a frustratingly stop-start contest.
However Tedesco's kick return set up Paul Vaughan to level the game at halftime, before producing his second-half heroics.