After DeVoe (Neil Sandilands) left his dead body in Barry's apartment — stabbed with one of his new wedding gifts no less — Barry had the chance to run or face the murderous music, and he chose to try to prove his innocence. But after watching the evidence mount against him, it became apparent to everyone involved that the only way to get Barry out of hot water was to have him take the stand and admit to being The Flash.
Setting aside the fact that admitting to being a vigilante (no matter how beloved) should have no bearing on the verdict of a murder trial, Barry was understandably reluctant. The first rule of superhero club is you don't talk about superhero club.
After a very convincing performance from DeVoe's wife though, Iris (Candice Patton) wasn't willing to gamble that the jury would ignore the deluge of evidence and rule in Barry's favor. In her own words, Iris would rather run forever with him than stand alone without him.
Just as she was about to tell everyone in the courtroom that he was The Flash though, Barry discovered a new ability. By grabbing hold of Iris, Barry somehow extended his speedster ability to include her, allowing them both to move faster than the eye could catch. In their little moment of speed, Barry begged Iris not to reveal his secret to protect not only her but everyone in their lives. Reluctantly, she agreed, and you know what that means: Barry was found guilty.
Right after he bailed out on his sentencing to stop a radioactive meta threatening to explode the city, of course.
Our final shots of Barry were as he hunkered down in his shiny new prison cell (which he'll be living in for the rest of his life without parole, by the way), just as he realized there's some seriously cruel irony at work in the universe; he's been put in the same cell his father occupied for 20 years.
The Flash airs Tuesdays at 8/7c on The CW.