Depends. Is this from the NY shooting? An example from the same article:
NYPD Commissioner William Bratton said Friday that Gurley was an innocent victim. "This is a very unfortunate tragedy," he said. "It appears that this was an accidental discharge."
The Rev. Al Sharpton is demanding that Brooklyn prosecutors investigate the shooting death of an unarmed, innocent man by a rookie cop who said his weapon accidentally discharged in the darkened stairwell of a housing project late Thursday.
The first implies the gun went off accidentally, the second the trigger was pulled accidentally.
I voted for "by accident". It reads better to me. But English is not my first language. I have not heard or read the words "on accident" until this topic.