Earnshaw came off the bench to score in last weekend's 2-2 draw in his Fire debut, and he had a similar impact on Saturday, heading home a cross from Jeff Larentowicz seven minutes from time to hand the Fire their fifth win of the season.
Fabian Castillo carved out a rare chance for Dallas in the 40th minute when he worked his way into the box and beat Larentowicz before his shot was saved by the leg of Fire goalkeeper Sean Johnson.
Dallas went close again early in the second half when a first-time shot from Ryan Hollingshead clipped the crossbar, but Chicago stayed level and brought Earnshaw into the game in the 63rd minute.
Seven minutes from time a corner kick for Chicago led to the lone goal as Harrison Shipp's corner kick ended up on the foot of Larentowicz, who delivered an inch-perfect cross for Earnshaw to nod inside the right post.
Dallas goalkeeper Raul Fernandez denied Earnshaw at point-blank range to keep his team within a goal, but Castillo's final chance of the game in stoppage time sailed over the crossbar, failing to keep his team's unbeaten run alive.