The Danish-born Martins, who in 1989 became ballet master in chief of the world-renowned company founded by the legendary George Balanchine, said "largely anonymous and decades old accusations of sexual harassment or physical mistreatment of dancers or others" had inflicted "a tremendous toll of turmoil, disruption and expense" on the ballet and its dance school.
"It also has exacted a painful toll on me and my family," Martins, 71, wrote in a letter to the boards of New York City Ballet and The School of American Ballet.
The school announced last month that Martins would no longer teach a weekly class while an independent law firm investigated "an anonymous letter making general, non-specific allegations of sexual harassment in the past by Peter Martins at both New York City Ballet and the School."
"The safety and well-being of our students is our absolute priority," the December 4 statement said.
"Thus far, the investigation has not substantiated the allegations in the letter or discovered any reason to be concerned about student safety."
Additionally, five ballet dancers told The New York Times last month that Martins threatened or physically abused them and others in the company.
The accusations against Martins were among a wave of sexual assault and other misconduct allegations against powerful men
in various industries, including media mogul Harvey Weinstein.
In response to Martins' retirement letter, New York City Ballet Chairman Charles W. Scharf released a statement thanking him for "leading the company to exceptional artistic heights and accomplishments."
"At the same time, the board takes seriously the allegations that have been made against him and we expect the independent investigation of those allegations to be completed soon," Scharf said.
In his letter, Martins denied any misconduct and said he cooperated fully in the investigation.
"I believe its findings would have vindicated me," he said. "To bring an end to this disruption which has enveloped the Ballet and the School, I have decided that it is time for me to retire," he added.
Martins' association with ballet dates back to 1967, when he was invited to dance the title role in Balanchine's "Apollo" at the Edinburgh Festival, according to the company's website.