Wales international Earnshaw's early goal was enough to earn the three points against Sheffield United, following back-to-back 1-0 defeats away at Coventry and Doncaster.
That brought up the club's best run of home wins since the Brian Clough era, and they currently sit just two points outside the Coca-Cola Championship promotion places.
Earnshaw told the Nottingham Evening Post: "It was a big win for us over Sheffield United. We needed to focus on what we do best; to make sure we got the little things right. And we did that.
"Our passing and movement was fast and we need that, because we are at our most dangerous when we move the ball quickly as a team and hit the opposition on the break.
"Hopefully, we can make it nine wins against Middlesbrough. That is obviously the team aim."