The game began evenly with both sides sending efforts over the crossbar before Boro forward Lukas Jutkiewicz thought he'd grabbed the game's opening goal.
Soon after Tony McMahon hit the bar with a 25-yard free kick as the visitors pushed for an opener.
In the early stages of the second 45, Fielding denied Jutkiewicz well from close range as Tony Mowbray's men continued to dominate.
They took the lead in the 80th minute when Main, who had only been on the field for three minutes, was set free left of centre, took a touch to control before drilling past Fielding.
The win sees Boro move one place from the playoffs and the Teesside club are now two points shy of Cardiff in sixth while Derby drop two places to 13th.