Eoin Morgan headed to the crease at 257 for two and was fortunate to escape an early dismissal as he ran a risky single and saw Joe Root narrowly miss with his throw at the stumps.
Rogers continued to stifle the Tykes bowlers albeit with a more patient approach than the previous day and passed his 150 with 66 overs bowled.
The visitors brought on spinners Adil Rashid (none for 69) and Kane Williamson (one for 69) to break the mould and the latter succeeded as Morgan was removed for 27.
The England hopeful's ambitious sweep saw the ball fly up perfectly into the hands of Adam Lyth to leave Middlesex 327 for three.
Yorkshire opted to take the new ball an over before lunch but the change was to no avail and the home side went into the interval 360 for three, needing 112 more to win.
There was no change in the pattern of play after the break however as, much to Yorkshire's frustration, Rogers continued to look assured at the crease.
Liam Plunkett (none for 57) thought he had removed Rogers' partner Neil Dexter when the right-hander dangled his bat out and Andrew Hodd caught the ball behind but the umpires were unmoved.
To rub salt into the wounds, Rogers then hit the 32nd four of his innings to complete the tenth double-hundred of his career and his highest ever score for Middlesex.
Yorkshire's fielders were visibly demoralised as the afternoon wore on and their opponents' target grew smaller.
Dexter certainly played his part, passing 50 before finishing unbeaten on 72 as Middlesex secured a memorable victory.
Middlesex ended with 19 points to Yorkshire's three.