Almost every comic book vigilante worth mentioning has found themselves wrongly accused of a serious crime at one point or another - heck, Spider-Man gets it on a daily basis from the Daily Bugle! But there’s a difference between being declared a public menace and having a superhero falsely accused of a truly heinous act, and that’s something that has only happened to a select few.
To be entirely fair, it’s not unheard of for a superhero to snap and do something horrible - Hal Jordan once wiped out the Green Lantern Corps, and Jean Grey went around eating suns for a while. However, when a hero is accused of crimes against humanity, it’s usually the result of a classic frame-up, leaving them to try to clear their name and continue saving the world at the same time.
Having already slain one of Barry Allen’s brides via time-travel, the Reverse-Flash showed up again in The Flash #323 to repeat the trick - only, this time, the Flash was ready. Allen ran backward in time to intercept his long-time foe, but when he caught up to him, he stopped the Reverse-Flash so suddenly that he perished as a result.
This led to a lengthy storyline known as The Trial of Barry Allen, in which the Flash took the stand to defend himself on charges of slaying a man from the future. With self-defense difficult to prove in the case of time-travel, Allen actually ended up convicted and spending significant time behind bars - before he escaped to the future himself to lay low for a while.
At the end of the Bruce Wayne: Murderer? arc, the Dark Knight returned to his mansion to find his girlfriend, Vesper Fairchild, deceased under suspicious circumstances. The Gotham City PD immediately placed Bruce Wayne under arrest, but when jail proved too frustrating to handle, Batman broke out and decided to give up his Wayne identity altogether. He became a caped crusader full-time as he attempted to solve the mystery in Bruce Wayne: Fugitive.
Though it took some time, Batman was eventually able to uncover enough evidence to prove that assassin David Cain - father of future Batgirl Cassandra Cain - had slain Fairchild, under orders from President Lex Luthor. Deciding that the Wayne persona was worth holding on to after all, Batman cleared his own name and went right back to living his double-life.
General Thaddeus “Thunderbolt" Ross has spent much of the modern era of comics as the Red Hulk, making him practically invulnerable - but he got depowered just in time to be taken out by an unknown assailant in Captain America Vol 9 #6. Taking Thunderbolt off the board was only part of the plot, however, and the rest of it involved framing Steve Rogers for the crime.
Aided by a clandestine group of women warriors known as the Daughters of Liberty, Cap escaped prison and set about clearing his own name - only to find more success than he could ever imagine. Not only did Rogers discover that the villain known as the Foreigner had slain Ross, he eventually learned that the cadaver was a fake and that the former Red Hulk was actually alive and helping the investigation from behind the scenes.
Of all the many superheroes to be framed for heinous crimes, the least likely suspect is probably the lovable Squirrel Girl - and even more so given that the charges in question were domestic terrorism. But that’s exactly what happened to Doreen Green in Unbeatable Squirrel Girl #20.
Frequent foe Melissa Morbeck set numerous zoo animals loose on a rampage through New York, and then told the media and police they were under Squirrel Girl’s control (which, to be fair, is one of Squirrel Girl's superpowers). Fortunately, the NYPD was soon bombarded with text messages from some of the Marvel Universe’s best and brightest - including Iron Man, Thor, and Hulk - attesting to Squirrel Girl’s goodness, and so they turned their attention to the real culprit.