The riots began with a police raid of the Greenwich Village bar back in June 1969, and became a seminal moment in the LGBTQ movement.
"While I'm certainly not going to stand up here and pretend to be an expert on what happened at Stonewall, I do know that what happened should not have happened," O'Neill said. "The actions taken by the NYPD were wrong, plain and simple. The actions and the laws were discriminatory and oppressive and for that I apologize."
On Twitter, Mayor Bill de Blasio called the apology "a powerful moment."
"[Fifty] years after Stonewall, we are reckoning with the past and building bridges between police and the LGBTQ community," de Blasio wrote.
It's the first time an NYPD commissioner has apologized for the department's actions leading up to the riots.
More than 6 million people are expected to participate in Pride Month events because three major Pride festivals are happening at once.
In addition to the 50th anniversary of the Stonewall riots, an international celebration of LGBTQ rights known as World Pride is coming to New York.
On Thursday, the NYPD held it's first-ever security briefing for Pride Month.
Web Extra: NYPD Pride Month Security Briefing
Officials said there were no credible threats against the NYC Pride parade.
"I want nothing to detract from this inspiring celebration," O'Neill said. "The NYPD takes all forms of bias seriously, because we will never tolerate hate of any kind on our city's communities."
This comes as police have seen a 30 percent jump in hate crimes based on sexual orientation this year.
for more features.