People ran screaming out of Resorts World Manila, which is across a road from the Philippines' international airport, after the man fired what police chief Ronald dela Rosa said was an M4 assault rifle and set fire to a gambling table around midnight.
The man did not shoot anyone but 53 people were reported injured in the stampede and from the smoke, while one security guard accidentally shot himself in a panic, Dela Rosa said.
The gunman disappeared into the chaos of smoke and running people, leading to a manhunt throughout the casino, hotel and shopping complex that ended just after dawn.
Dela Rosa initially said police killed the assailant who was hiding in a hotel room, but later told reporters the man committed suicide.
"He lay down on the bed, covered himself with a thick blanket, apparently poured petrol on the blanket and burned himself," Dela Rosa said.
Before the gunmen had been killed and police had confirmed any motive, the Islamic State group claimed responsibility and US President Donald Trump also branded it a "terrorist attack" .
But the incident was most likely a robbery gone wrong, Dela Rosa said, pointing out the man did not shoot at anyone and appeared to be intent just on stealing gambling chips.
"For now, we can say that this is not an act of terror. There is no element of violence, threat or intimidation that leads to terrorism."
Dela Rosa said the man, who appeared to be acting alone, walked into one of the gambling rooms and fired the rifle at a large television screen, then poured gasoline onto a gambling table and set it alight.
He said the man then fired again at a stock room containing gambling chips and filled a backpack with chips worth 113 million pesos ($2.3 million).
The man left the room and went upstairs to the hotel section, but left the backpack near the stock room, according to Dela Rosa.
Manila police chief Oscar Albayalde also insisted it was not a terrorist attack.
"It is a simple robbery and most likely it was done by a demented person," Albayalde told reporters outside the casino.
Dela Rosa said 18 of the 54 injured people were in hospital and the others suffered only minor injuries. He said the condition of the security guard who accidentally shot himself was unclear.
People inside the casino recounted feelings of terror when the shooting occurred.
"I was about to return to the second floor from my break when I saw people running. Some hotel guests said someone yelled 'ISIS'," Maricel Navaro, an employee of Resorts World, told DZMM radio.
ISIS is another acronym for the Islamic State group.
"Guests were screaming. We went to the basement locker room and hid there. People were screaming, guests and employees were in panic," Navaro said.
"When we smelled smoke, we decided to go for the exit in the carpark. That's where we got out. Before we exited, we heard two gunshots and there was thick smoke on the ground floor."
Outside the complex, relatives of people caught inside waited to hear news of their loved ones.
"Our daughter called us past midnight saying she was in the VIP section of the casino and there was smoke and they were suffocating," Gil Yongco, 42, told AFP.
"We are very worried about her. We haven't heard from her."
Philippine President Rodrigo Duterte imposed martial law last week across the southern region of Mindanao to crush what he said was a rising threat of IS there.
He declared martial law shortly after militants went on a rampage through the southern city of Marawi, which is about 800 kilometres (500 miles) south of Manila.
Security forces are still battling the militants in Marawi, and the clashes there have left at least 171 people dead.
Duterte said last week he may need to declare martial law across the rest of the country if the terrorism threat spread.
Dela Rosa emphasised there was no link between the casino violence and the Marawi clashes.