Johnnie Moore, 47, was blocking pedestrians near Ninth Avenue and West 41st Street about 5:30 p.m., a Port Authority Police Department spokesman said.
When a Port Authority officer asked Moore to move, he refused and grew angry, the spokesman said.
"F--k you! I'm not moving!" Moore said before barreling into the officer, according to the PAPD.
Moore then took out a BIC pen and tried to stab the officer's face until a second officer arrived and the two were able to subdue the man, the PAPD said.
No injuries were reported in the incident.
Moore was taken to Bellevue Medical Center. He was expected to be arraigned on charges of menacing, resisting arrest and disorderly conduct, the Port Authority said.