The Rams suffered a miserable 5-2 drubbing at the City Ground in the reverse fixture at the end of December, when Earnshaw helped himself to two goals.
And the Wales international piled more misery on the club he left to join Forest with a 79th-minute winner.
Earnshaw, who replaced fellow former Ram Marcus Tudgay after 66 minutes, controlled Paul Anderson's lay-off before driving a shot into the bottom corner from the edge of the area.
The victory, a fourth in succession in all competitions, temporarily lifted Billy Davies' side into the npower Championship play-off positions.
It was an eighth defeat in 10 matches for Derby, who finished the game with 10 men following Dean Moxey`s red card in injury-time.