Here's the deal (POSSIBLE SPOILERS):
-This quest will only be possible if you complete the Liberation of Skyrim quest (you side with the Stormcloaks; I really hate to break it to those of you who prefer to side with the Empire, and you hate the TG and the Black-Briars. It would be damaging to the game if you completed the Civil War quest for the Empire since Maven will be Jarl)
-The quest will start by speaking to any of the Riften guards, who will tell you that they are trying to bring justice to the Thieves Guild and Maven, You will be given the dialogue option "Do you need any help?" The quest will be initiated
-I'm going to make Brynjolf a little bit of a coward and he will surrender to you when you kill all of the Guild members and defeat him in a fight; you can accept his surrender and the guards will arrest him and he will be in the Riften Jail, or you can execute him (NOTE: If you are performing this quest prior to 'A Cornered Rat', it would be certainly be best to accept Brynjolf's plea of surrender since he might as well be important to progressing through the Main Quest; if you have completed the Main Quest, you can carry out the execution. Either way, you will be rewarded.)
-Afterwards, the Jarl of Riften, Laila Law-Giver, will request that you and two guards carry out a warrant to arrest Maven Black-Briar. I hate to admit this, but, out of hate, Maven will resist arrest and become hostile towards you. You must kill her. Afterwards, you must bring news of this to the Jarl, and she will give you 50, 000 septims for completing the quest.
-Two days later, a Khajiit assassin tries to kill you; when you kill him, you will find a note when you loot him, the note is telling you "When you kill the Dragonborn, come to the Black-Briar Manor and you will be rewarded; you must show this note to the Jarl in Riften, and she will issue a death sentence to the Black-Briar family (which is awfully cruel, and I should probably give a kinder punishment). You are once again accompanied by two guards and you will kill Hemming and Ingun, who want revenge against you for killing their mother. Kill them both and report back to the Jarl. She will be grateful and make you chief of the Riften Guard and you will be rewarded 100,000 septims. (I hope becoming something like captain of the guard can be possible through the CK).
Here are some things that you can do as leader of the Riften Guards:
-You can command your guards to follow, dismiss, and, hopefully, if possible, tell them they are off duty or tell them to resume duty. There are consequences, however:
If you get caught committing three crimes, you will be revoked of guardship and you can never become chief of the Riften Guard again except by console, I think.
After this mod, I'm going to make another mod where the former Thieves' Guild hideout becomes an Elite Guard house. In that guard house, you can hire an elite bodyguard that is quite powerful, and they can also become Blades members.
Anyway, I think this mod will be entirely possible with the Creation Kit. I just need to find voice actors. Give me your thoughts.
NOTE : Killing Brynjolf will only be possible through the console.
Make him non-essential, then, type "damageav health 1000" and he will die.