Note: This quest is only available if you don't side with The Institute during the main story missions. Once you... "take care" of The Institute you can travel to Diamond City to have the requirements for this quest met.
In Sheeps Clothing
By the chapel in Diamond City you will find Danny, slumped over in pain and being treated by the pastor. He will tell you that he saw the Mayor with a synth and was attacked by him, officially giving you this quest and tasking you to "Confront Mayor McDonough". You can optionally choose to help Danny by giving him a Stimpak (which you can afford, right!?). Time to go confront the mayor. Depending on your companion, you can leave them behind to take care of Sullivan if you wish.
Head up the nearby stairs and use the elevator by the entrance to head up to the Mayor's Office. Once you get up there you will see Piper (or a guard) banging into the door. The mayor has locked himself in. There are a number of ways to get inside. You can picklock the door (it is a [NOVICE] lock) but Piper will dislike that (the door is marked red for some dumb reason). You can alternately find a button under Geneva's desk that will open the door (like you found at Kellogg's House). If you want to pass a Charisma check, put on your Charisma-boosting gear before confronting the Mayor! You also might want to consider quick-saving at this point.
McDonough will stop you, holding Geneva as a hostage. If you want, you can convince him to let her go with a moderate speech check (which makes Piper happy). After that, the Mayor demands to walk out of the city, but Piper and/or the security guard won't allow him. Here you can agree, attack, question him or make him stand trial. We recommend telling him he is going to stand trial, as Piper loves that response. Either way, you will likely have to take him out. If you couldn't get Geneva out of harm's way, be sure to use VATS to target McDonough's head. He isn't a challenging opponent at all at this point (level 12 or so... pathetically easy to you by now), so take him out quickly.
Note: Make sure Geneva survives this encounter. She is the only one that can sell you the "Home Plate" house in town with the Mayor gone, so you want to keep her alive if you want to - and have yet to - buy that property.
Once he is dead, you can loot his corpse for "Kellogg's House Key" (which you definitely don't need) and various ammo and caps. Everyone around will comment on his death and thank you as the quest comes to an end.