Bottom side Notts, who began the day on 61-3 in pursuit of an unlikely 452 to win at Scarborough, lost Tom Moores in the first over the day.
They never recovered as Tim Bresnan finished with 5-36 and Jack Brooks 4-35 as Notts were bowled out for 146.
Defeat leaves Notts 35 points adrift of safety with with only three games left.
Yorkshire, who are chasing a third successive County Championship title, and Middlesex have four games to play and meet at Lord's in this season's final round of matches next month.
A Yorkshire victory looked unlikely when they slumped to 51-6 on the opening morning after being put in by Notts captain Chris Read.
But a fourth win of the season never looked in doubt after they recovered to post 282 in their first innings before skittling the visitors for only 94.
Moores, who resisted Yorkshire's bowlers on day three for an unbeaten 41, fell to the fourth ball of the final morning when he edged Bresnan to Adam Lyth at second slip.
Bresnan removed Samit Patel and Chris Read in quick succession to complete his first five-wicket haul of the summer before Yorkshire wrapped up victory shortly after lunch.
Ryan Sidebottom had Ben Hutton caught behind off the third ball after the interval, and in the next over Brooks had Brendan Taylor caught at cover and bowled Luke Fletcher with successive balls.
Imran Tahir survived the hat-trick ball but soon became the last man to fall when he fended Brooks to Alex Lees at short leg.
Champions Yorkshire moved to within five points of Division One leaders Middlesex by wrapping up a 305-run win over Nottinghamshire.