The 26-year-old claimed that he started the fire in protest against the cramped living conditions in the hotel in Bingen, where a number of refugees and seasonal workers were living, and against what he saw as poor prospects for his future.
He has now been taken to prison to await trial.
Four residents and two firefighters were slightly hurt by smoke inhalation during the blaze in the early hours of last Thursday morning.
Detectives had initially followed up on the suspicion of a far-right political motive behind the attack but quickly realiyed it was a dead end, arresting the Syrian culprit on Saturday evening.
Other residents told officers that the man was behind the arson attack. He confessed and said that he had acted alone, spraying the swastikas to create a false trail.
The man had been living in the hotel for around six months, police said.