BERLIN—Two residents at a refugee shelter in Düsseldorf are being held on suspicion of starting a fire that left the building in ruins this week, a city prosecutor said Wednesday.

The two 26-year-old men from North Africa were in police custody and waiting Wednesday night to face a judge, who would decide whether to prolong their incarceration with charges pending, a spokeswoman for the local police said.

The...