The 24-year-old is accused of shouting racist slurs at the victim at a bus stop in Magdeburg in the early hours of Aug. 25.
The assailant then set his dog on the 36-year-old Iraqi and hit him with a baseball bat, police have said. The victim suffered a cut to the head, but did not need to be hospitalized.
Magdeburg police said Tuesday that the suspect, who had a previous record of violent offenses, had admitted the attack. A city court ordered him held in custody pending possible charges.
There has been a revival of concern over levels of racist violence and far-right extremism in the depressed, formerly communist east. Earlier in August, eight Indians were chased by a mob in an eastern town as onlookers shouted slurs.