The draw earned Millwall only their second point on the road this season.
Lions midfielder Trotter got the final touch with his head after the ball had ricocheted round the six-yard box following a 55th-minute corner to cancel out Barry Robson’s first-half opener for Boro.
Robson’s sweet strike was Boro’s first goal in three games at the Riverside, but although Tony Mowbray’s side broke a 101-year club record by going 11 games unbeaten at the start of a season, a fifth home draw was not enough to keep them in second place in the table.
Boro hit the post twice, through Scott McDonald and substitute Faris Haroun in stoppage time, while second-bottom Millwall are still chasing their first away win of the season and their first three points since a 2-1 victory against Nottingham Forest in August.
Boro boss Mowbray made four changes to the side that drew 0-0 with Reading in their last match, with goalkeeper Jason Steele and Kevin Thomson making their first starts of the season and Joe Bennett and Julio Arca both returning.
Patrick Agyemang, signed on loan from QPR this week, and Darius Henderson formed a new-look strike partnership for Millwall, while Jimmy Abdou returned to the Londoners’ midfield.
Neither side created any chances of note until Boro ended their long wait for a goal in front of their home fans.
Marvin Emnes had struck the last goal for the Teessiders at the Riverside, against Coventry in August, so the relief was audible when Robson broke the deadlock with Boro’s opener in the 24th minute.
Defender Tony McMahon crossed to the edge of the penalty area from the right, and when Scott McDonald chested the ball into Robson’s path, the Scotland international fired a low shot from 25 yards into the bottom corner.
McDonald then pulled a 20-yard shot just wide for the home side before Liam Trotter headed Millwall’s only chance of the half off target from Agyemang’s cross in the 29th minute.
Middlesbrough continued to dominate possession as half-time approached, but despite Robson’s promptings were unable to carve out any further openings.
McDonald’s goalbound shot was blocked shortly after the restart and Millwall goalkeeper David Forde did well to hold the Boro striker’s 25-yard effort 60 seconds later.
The Australia international went even closer soon after that when his angled drive from inside the area following Emnes’ pass came back off the post with Forde well beaten.
But Millwall equalised with their first attack in the second half.
Jay Simpson’s shot was deflected for a corner off defender Matthew Bates and a frenetic scramble followed Brian Howard’s subsequent ball in, with Trotter getting the final touch with his head after an spell of pinball inside the Boro penalty area.
Millwall were full of fight in the closing stages, but Boro went close to snatching all three points when Haroun, a second-half replacement for Thomson, headed Emnes cross against the post in the 95th minute.