Prosecutor Nicolas Bessone described the suspect as a Tunisian national who had settled status in France.
The man was reportedly evicted from the hotel for unpaid rent, leading him to assault one person in his old room, before stabbing the manager, his son and three further people at around 3pm local time.
"It would appear that he blindly and gratuitously attempted to strike people," Mr Bessone told reporters.
After being chased out of the hotel by customers, the man was “neutralised” by armed police in front of a kebab shop.
The man died despite efforts to resuscitate him, France 24 reports.
One of the victims injured was in a critical condition and two others were also seriously wounded.
Bruno Retailleau, France’s interior minister, visited the scene of the attack and the city's police headquarters on Tuesday night.
Mr Bessone said the investigation into the incident was in its early stages and that the motive of the assailant was not known.
Bill Bowkett