He moved to New York City in 1982 and joined the BMI Lehman Engel Musical Theater Workshop, founded by music director Lehman Engel, where he met Lynn Ahrens, who was to become his longtime collaborator. He also studied Musical Theater in the graduate program at New York University during this time, where his teachers included Richard Maltby, Jr. and Arthur Laurents, among others. The first Ahrens and Flaherty collaboration that was produced was a one-act children's show, "The Emperor's New Clothes", for TheatreWorks USA in 1985. Their next produced musical was "Lucky Stiff" , produced Off-Broadway in 1988 at Playwrights Horizons.