The What Makes You Beautiful singer was returning to his hotel in the Big Apple while on a break from the American leg of the band's Take Me Home tour when he was spotted by devotees who raced to greet the star.
Styles' minder attempted to keep the crowd at bay, but the 19-year-old heartthrob had to scramble up metal railings and enter via a back entrance to escape the mob.
Video footage taken at the scene shows girls clawing at Styles' T-shirt as he climbed the railings outside the building.
An onlooker said, "Harry was mobbed. There were girls everywhere. It may sound fun, but it looked scary."