The 21-year-old man targeted the shelter from his third-floor apartment just 40 metres away in the shooting on yesterday, police said in a statement.
The mother of the Macedonian girl had noticed that her child was hurt in the leg but initially thought someone had thrown stones or sand at her.
But shortly after, a witness saw the suspect shooting from his apartment, wounding an 18-year-old Syrian in the leg.
Police searched the man's apartment and removed an air rifle and munition.
More From This Section
"It is unclear if the act was politically motivated," added police, adding that investigations were ongoing.
Hate crimes and attacks against migrants have exploded since arrivals spiked to 1.1 million in 2015, mostly from the Middle East and Africa.
Germany recorded nearly 1,000 far-right offences targeting refugee shelters last year, a five-fold annual rise.
Some 923 offences against refugees and refugee facilities were recorded in 2015, against 175 the previous year, according to Interior Ministry statistics on political crime in Germany.