Dean is a former Fort Worth police officer being charged with murder in the 2019 shooting of Atatiana Jefferson.
Tarrant County Judge Lee Gabriel granted the motion to recuse the trial judge on Tuesday.
In a hearing last week that came on the day jury selection was to begin for Dean's murder trial, witnesses testified that Hagerman appeared irritated and hostile toward the defense. They also testified that they did not believe Dean could get a fair trial under Hagerman.
The state noted that Hagerman had, at times, acted that way toward both the state and defense and that he had granted every defense motion to delay the trial.
The trial was supposed to begin on June 21, which was the fourth date the trial was supposed to start. A new trial date for the murder trial has not been set.
Jefferson was home playing video games with her young nephew when a neighbor called police reporting her front door was open, which he found unusual. Jefferson apparently thought Dean was an intruder in her backyard and she grabbed a gun, police said at the time. Dean, who was in uniform but did not announce himself, shot Jefferson through a window, bodycam video showed.