The defending champions, chasing 315 to win, were bowled out for 294 to slip to a 20-run defeat, their first home loss of the season, on Thursday.
England quick Josh Tongue took the final three wickets, including last man Tom Lawes, who made 33 before holing out to Ben Slater on the boundary, to finish with 5-100.
Nottinghamshire, who were deducted one point for a slow over-rate, are now 14 points clear at the top ahead of their final match against Warwickshire at Trent Bridge, while Surrey must win at Southampton against Hampshire if they are to have a chance of winning their fourth straight title.
The odds are now firmly on Nottinghamshire lifting the title for the first time since 2010.
Notts were helped into their strong position earlier in the season by an excellent short stint from Sheffield Shield player of the season Fergus O'Neill, the Victoria quick who took 21 wickets in four matches at 17.9 apiece.
Somerset's title hopes came to an end on Thursday after they came up short in a draw with Hampshire.
Archie Vaughan, son of former England captain Michael, took 6-96, but Hampshire, who had been forced to follow on, held out to finish on 8-201.
In Division Two, Leicestershire were crowned champions after play against Kent was abandoned on day four without a ball being bowled.
It was a triumph for Peter Handscomb, their Australian skipper who had been an inspirational leader all summer but had to return home for the new domestic season.
Leicestershire are now out of reach of second-placed Glamorgan, who were also consigned to a rain-affected draw against Derbyshire.
But Glamorgan, who had their own Australian favourite Marnus Labuschagne back on board earlier in the summer, were still able to celebrate promotion after Middlesex could not force a win against Lancashire.
Lancashire declared on 5-375 with Josh Bohannon hitting 87 off 69 balls and passing 6000 career runs in the process.
Middlesex were still 65 short of making them bat again on 4-92 when play ended.
Back in Division One, Jonny Bairstow was unbeaten on 64 with Yorkshire 53 runs ahead of Sussex when bad light ensured a draw at Hove.
Durham's Emilio Gay scored 161 and Will Rhodes finished unbeaten on 151 as their match with Worcestershire, whose relegation was confirmed on day three, ended in a draw.