Start a sandbox game with a $200k treasury, in World Wars era (or later, I did Cold War), and 50 starting population.
Your palace guards will never side against you in a coup attempt, so upgrade your Palace to get 4 more guards and max the budget to increase their combat effectiveness. Don’t build any other military buildings.
Now you need to upset the Militarist faction, which you can do by building Embassies. I quickbuilt a dozen of them and that was enough on medium difficulty, your results may vary based on your settings.
You’ll know you’ve built enough when you get an Ultimatum from the Militarist faction. Make sure all 8 job slots at your Palace are filled, then abandon the Ultimatum, which will trigger the coup attempt.
The Palace guards should be more than capable of fending off the coup, although you may need to wait for them to arrive at the Palace. The achievement will unlock as soon as the attackers are defeated.