and by that I mean if I chose to get in good with the Forsworn and help them retake Markath, the game should allow me to do so in some way.
It does... when you first enter Markarth and witness that murder, some dude will give you a note... follow the note and he will give you a quest, play out that quest and you'll end up in prison where you will meet Madanach (the lost king of the Forsworn), who will recruit you into his fold, orchestrate a prison break, and fight to retake Markarth, at which point he will take credit for your crimes and your bounty will be erased...
... of course, I don't know how that questline actually ends since I decided to kill Madanach during the prison break, had the Forsworn turn on me, and put them all down, thinking I could then talk to the Jarl of Markarth and everything would be cool, but NOOOOO... instead I broke the quest and they never took credit for my crimes, so I was unable to enter Markarth until the Civil War was over, and my name was cleared by the Stormcloaks... of course, then I went and got a tresspassing bounty on my head during a theive's guild quest, and now the gaurds are glitched, not accepting payment, saying I'm a murderer and that I need to go to jail, but won't ever actually take me to jail (sicne I'm sure the jail is glitched due to the above mishap), making doing anything in Markarth a pain in the ass. Of course thats all beside the point, and is totally my fault, but still... my point is that you CAN get in good with the Forsworn and help them retake Markarth (at least I assume thats how the questline would have progressed had I not mucked it up).