Dunn is dealing with only a minor sprain and was removed shortly after the team took the field for batting practice.
Dayan Viciedo replaced Dunn, one off the major league leaders with 21 homers. Viciedo was batting third and playing left field.
A team spokesman said Dunn's injury is not related to a few foul tips he hit off the ankle on Tuesday. Dunn has homered in three straight games for the first time since June 6-8, 2010.
Viciedo, batting .262 with 12 homers and 29 RBIs, has primarily hit later in the lineup and batted third for the first time this season.