When you return to Madanach, the old man asks you if you’ve spoken to Braig. When you confirm this, he points out that you saw something happen and got involved, and he’s tired of lurking around in the mine and not actually doing anything. According to him, it’s time that the Forsworn in here got out and went into the hills to fight. Whether you feel like being agreeable or grouching about his interminable speeches, Madanach is willing to provide you with a way out, if you prove your loyalty to him. To demonstrate that you’re willing to work with him and not betray him, he wants you to kill Grisvar, the man who had a shiv you could get ahold of. Apparently, Grisvar is the only person in the mine not loyal to Madanach at the moment, and the King in Rags is unwilling to take the risk of being found out mid-escape because of him.
When you go to Grisvar, you can just attack him, or talk to him first and give him Madanach’s greetings. Either way, he fights for a bit and then flees- hunt him down and you can kill him and, if you didn’t get a shiv from him before, you can get one now- or a second if you already have one. He may even have two shivs.
Returning with Grisvar dead, you are thanked by Madanach, who declares now to be the time for the escape, as you are now ‘one of us’. He finally rises from his desk to go to the central chamber of the mine, where the other miners are gathered. Uraccen asks what’s going on- he’s sure Madanach wouldn’t have Grisvar killed if he still had any use for the thief. Madanach agrees with this estimation, loudly declaring that it is time for the Forsworn to escape their prison and return to the fight against the Nord oppressors.
If you’ve opted to slay Madanach instead, then simply ambush him- he is absorbed in writing his letter and won’t notice when you come up behind him. This is vital for you, as he is a spellcaster- the more damage you can do to him while he’s rising from his chair, the better, as you are lacking all your usual equipment and will have to take him on possibly with just a pickaxe or two, rather than what you’re used to wielding. He’s a tough fight, but thankfully doesn’t flee to get his supporters and they don’t come in after you- in fact, you can wander back out into the mine afterwards if you like and they’ll pay you no special heed!
It’s possible to turn on him later during the trip through the dwarven structures as well, but this is much riskier, as all his followers are along and if you do it mid-fight you’ll have to contend with whatever spiders or Dwemer machines are in the fight at the time on top of Madanach and his Forsworn.