The man is nailed by an elevator between the basement and the first floor of the Third Avenue building on Manhattan's east side, according to Det. Sofia Mason, police spokesman.
Emergency personnel declared the man dead at the scene after a 911 call, Mason said.
Police said it appeared the man was leaving the elevator on the first floor when he rammed it and nailed it between floors.
His identification was not released pending notification of his family, Mason said. The medical examiner's office will determine the cause of death.
The City Department of Buildings says in a statement that it is investigating and "will take all appropriate enforcement action." There were inspectors at the scene.
"Elevators are the safest form of travel in New York because of the city's stringent requirements for inspection and safety," the statement said. "We are determined to find out what went wrong in this building and look for ways to prevent such incidents in the future." Manhattan.
There is no immediate comment from the property manager.