The incident happened around 6 p.m. Monday in the Queens Public Library at 40-20 Broadway in Astoria.
Police say the suspect approached the 15-year-old girl, grabbed her crotch and then exposed himself before fleeing the building.
The suspect is described as a Hispanic or Middle Eastern man, 40 to 45 years old, wearing a tan jacket, gray hat, black shirt and blue jeans.
Authorities ask anyone who may recognize the suspect to call Crime Stoppers at 1-800-577-TIPS. All calls will be kept confidential.