Captain Rogers produced one of the finest knocks of his distinguished career to secure his team's second victory of the season, romping to his tenth first-class double century and his highest score for Middlesex in the process.
He found assistance from Neil Dexter (72*) after losing overnight partner Dawid Malan for 35 and Eoin Morgan for 27, as Yorkshire's attack failed to do any damage with the old or new ball.
This was an important knock for Dexter on his return to the first XI, and he looked increasingly fluent as it went on, reaching his first half century of the campaign by launching Kane Williamson into the Grand Stand for six.
But this was all about Rogers. Resuming on 231/1 and in bright sunshine - but with 242 still required for victory - Yorkshire would have remained confident of recovering from a poor third afternoon and forcing the win.
Despite fighting through some scares early on - including a huge LBW shout from Ryan Sidebottom - Rogers rarely lost concentration and scored quickly throughout, finding the fence with ease - particularly square of the wicket on the off side and through third man.
Malan looked less comfortable, but his departure failed to cause panic in the Middlesex ranks as Morgan joined Rogers at the crease to put on 70 and keep the momentum with the home side.
His dismissal, caught by wicket-keeper Hodd attempting a sweep off Williamson, gave the visitors some hope, but with the sun out and the pitch behaving well, Rogers and Dexter quickly swept Middlesex towards their second win of the summer, and one of the most remarkable in the club's 150 years.