The victory provided Slater with a happy ending in his first outing as Queensland captain in his 31st and final Origin appearance since his debut in 2004, with the 35-year-old fullback turning in a typically inspirational performance.
A knock-on from Slater saw Queensland denied a try in the early stages as the home side began dominating territory to keep New South Wales pinned down near their own line.
A break downfield by hooker Damien Cook gave the Blues attacking position and a try down the left flank loomed for the visitors before Holmes intercepted a Tedesco pass to race 95 metres to score and convert his own try after 11 minutes.
Courageous defence saw New South Wales repel wave after wave of Queensland attack before Blues five-eighth James Maloney was sinbinned for running Slater off a bouncing ball ingoal, with Holmes kicking the penalty to make it 8-0 after 31 minutes.
The Blues found themselves under more pressure but clawed their way back into the contest after Trbojevic plucked Maroons playmaker Cameron Munster's long pass out of the air and went the length of the field, before Tedesco weaved through poor goal line defence for their second with Cleary converting both tries for an unlikely four-point advantage.
Holmes' second brought Queensland back to life while the tiring Blues missed chances to extend their lead before Munster split the defence to combine with Gavin Cooper to send Cherry-Evans in for the match-winner in the 57th minute.
The Blues kept attacking and looked capable of overturning things but basic errors and desperate Queensland defence saw them unable to add to their score.
Queensland 18 (Valentine Holmes 2, Daly Cherry-Evans tries, Holmes 2 cons, 1 pen)
New South Wales 12 (Tom Trbojevic, James Tedesco tries, Nathan Cleary 2 cons)