Authorities said they were called to the landmark tower around 3:40 p.m. after the 35-year-old man wielded the sword and put it to his chest.
NYPD Chief of Department Terence A. Monahan tweeted a video of the incident and the officers' response.
"Our men & women in blue are prepared for any situation. When an emotionally disturbed man walked into the Empire State Building holding a cane sword today, NYPD cops reacted quickly to keep people safe. Our highly-trained officers delivered a safe outcome for everyone," he said. "Well done!"
The man was taken into custody and brought to Bellevue Hospital.
No one was injured and no charges have been filed yet, police said.
The man was threatening to kill himself, sources told the New York Post.
“I see him sitting ... sort of like in a sleeping position," witness Paul Allen said. "Then when I was queuing up, he got up and put the sword to his chest and started shouting."