Fynn Hudson-Prentice claimed his maiden first-class wicket on a third successive challenging day for bowlers at The Pattonair County Ground.
The all-rounder picked up the wicket of Max Holden with his first ball in Derbyshire whites, to leave the visitors 204-5 which soon became 250-6.
But an unbroken 186-run sixth wicket stand between Dawid Malan (177 not out) and John Simpson (91 not out) took Middlesex beyond the follow-on target and to 436-6 at the close, trailing by 121 runs.
Vitality Blast is back this month! Tickets for all seven home matches on sale now, including the big clash against Notts Outlaws on Friday 26 July. Buy online or call 01332 388 101.