The incident happened on July 9, just before 6 p.m., on the BX2 MTA bus.
Authorities released surveillance images of the man, taken on the bus in Morris Heights.
The 27-year-old woman, who was with her children, reportedly observed the man masturbating and asked him to stop. She then alerted the bus driver.
The suspect approached the victim and brandished a knife.
The woman struggled with the suspect and grabbed his hand to defend herself.
The suspect fled the bus as it stopped at East 171st Street and Grand Concourse.
There were no injuries sustained.
Anyone with information in regards to this incident is asked to call the NYPD's Crime Stoppers Hotline at 800-577-TIPS.