Set 320 to win off 53 overs, Yorkshire lost Adam Lyth early on but opener Alex Lees and Gary Ballance (43) set the platform for an exciting run chase.
Lees (107), Joe Root and Jonny Bairstow accelerated after tea but the visitors lost quick wickets and were left hanging on for a draw, ending 257-9.
Number 11 batsman Jack Brooks survived the last two balls of the match from England's Stuart Broad to avoid defeat.
Broad trapped Steven Patterson lbw in the final over, but Brooks edged his first delivery for four through gully and safely defended his second as Yorkshire clung on for a third draw in three Championship matches in 2016.
Earlier, Chris Read's 101 helped Notts from their overnight 151-5 to 348 all out in their second innings.
A game that looked set to peter out to a tame draw came to life when reigning champions Yorkshire, 64-1 at tea and requiring 256 further runs to win, attacked in search of an unlikely victory in the final session.
Root, who made a first-ball duck in the first innings, scored a quick-fire 27 and England team-mate Bairstow added 35 off 20 balls, while lower-order hitters Liam Plunkett and David Willey were pushed up the batting order.
But that intent almost proved Yorkshire's undoing as they were pegged back by Jake Ball (3-68) and Harry Gurney (4-53).
In the morning session, Yorkshire's wayward bowling was punished by Broad, who hit a 44-ball half-century and scored at more than five runs per over during a seventh-wicket partnership of 104 with Read.
Captain Read was 97 not out when Jackson Bird (23) became the ninth Notts wicket to fall, but Gurney saw off five balls from Patterson before Read reached his first Championship century of the season with a boundary off Adil Rashid.
Nottinghamshire are now top of Division One, while Yorkshire are four points behind in fifth.
Yorkshire drew with Nottinghamshire on a thrilling final day at Trent Bridge.