I had a similar problem, though mine occurred after the Forsworn Conspiracy was over (and it let me retaliate). Apparently this is a frequent problem. I've heard that this strategy has worked for quite a few people:
1. go to Markarth, and sprint past the guards to the Temple of Talos. If you talk to any guard before entering, it might not work.
2. there will be 3 guards there, 2 of them will usually try to attack you while the third initiates conversation. wear good armor, drink sleeping tree sap, be prepared.
3. click the option that says something along the lines of "You're corrupt, so-and-so is paying you!"
4. they'll blather on about something, then click the option of "Go to Jail."
It unfortunately did not work for me since I killed every guard in the Temple and they (for some reason) never respawned. Since you haven't completed the quest, perhaps they'll respawn for you?
If it doesn't work, do you have a previous save? I'd even recommend using one that's fairly far back because trust me, this bug makes Markarth intolerable. The Thieves Guild just adored sending me there over and over again and every time I had to slaughter every guard to do simple little pickpocketing jobs.
Good luck, I hope you find a way to fix it!