Harmer finished with match figures of 14-172, as the county champions lost their last five wickets for 10 runs.
Nick Compton's 120 off 303 balls had helped Middlesex recover from 51-3, putting on 153 with Paul Stirling (55).
But they slumped from 252-5 to 262 all out as Division One leaders Essex won by an innings and 34 runs.
South Africa international Harmer, who returned career-best figures of 14-128 in last week's win over Warwickshire, has now taken 47 wickets in eight matches this season.
Middlesex began the day on 27-0, still needing another 273 runs to avoid an innings defeat, and got off to the worst possible start when Nick Gubbins (16) was caught by Alastair Cook.
Harmer next saw off Stevie Eskinazi (12) who was caught by Varun Chopra at leg slip, diving forward with one hand after Cook had parried the ball at slip, while Dawid Malan soon followed for one.
Compton steadied the ship and completed his first century of the season from 232 balls, but was trapped leg before to become Harmer's 11th wicket of the game and Middlesex subsided.
They lost their last four wickets in 27 balls, sending Essex 29 points clear at the top of the Division One table.

It says Tariq al-Harzi was responsible for co-ordinating suicide bombings in Iraq and moving weapons from Libya to Syria.
The US had offered a $3m (Â£1.9m) reward for the man it called the "emir of suicide bombers".
IS has not commented on the reports of his death.
Harzi was allegedly killed in the northern-eastern Syrian town of Shaddadi on 16 June.
The US Treasury Department had placed him on a sanctions list after designating Harzi as a "global terrorist".
It is thought that he had assisted foreign fighters from the UK, Albania, and Denmark.
He also raised funds for the group, including $2m from a single Qatar-based donor.
A Pentagon spokesman said Harzi's death was a blow to Islamic State.
"His death will impact [IS's] ability to integrate foreign terrorist fighters into the Syrian and Iraqi fight as well as to move people and equipment across the border between Syria and Iraq," Capt Jeff Davis said in a statement.
In June the Pentagon said it had killed Harzi's brother in a drone strike.
Ali al-Harzi was a person of interest in the investigation of the 2012 bombing of the US consulate in Benghazi in Libya. The US says he was killed in a drone strike in the IS stronghold of Mosul in northern Iraq.

The facility at Brow Top, which has a 24m pool and squash courts, had to been due to open to the public on Saturday.
However, because of "a small number of snagging and technical issues" relating to the learner pool, the opening date has been put back by a least a week.
The council's deputy leader, Mark Fryer, said the centre would not open until it was "pristine".
He said: "We can handle it being late but we can't handle it not being perfect. I wanted this facility to open as soon as possible but I wanted it to be pristine.
"There's a technical problem with the small pool and problems with drains which are not finished."
Spinner Simon Harmer took a career-best 9-95 as Essex beat Middlesex with just moments of a dramatic final evening at Chelmsford remaining.
[NEXT_CONCEPT]
A senior member of the Islamic State (IS) group has been killed in an American drone strike in Syria last month, according to the US military.
[NEXT_CONCEPT]
The opening of a new £11m leisure centre in Workington has been delayed.