Answer by Mark Binfield, consultant:
The first thing that would happen is that under Section I of the 25th Amendment, the vice president would automatically become president.
If the circumstances of the murder were clear (e.g., the vice president shot the president in public), the second thing that would happen, probably within hours, would be a vote by Congress to begin impeachment of the new president.
It's also possible that, while the impeachment process was getting underway, the Cabinet officers might try to invoke Section IV of the 25th Amendment, which allows the replacement of the president in case of incapacity. This would be legally dubious given that the vice president is required to make the recommendation to Congress in conjunction with the Cabinet officers, and the office of vice president would be vacant. (The new president could nominate a successor, but under such circumstances, Congress likely wouldn't confirm the nomination.) Moreover, the intent of Section IV was to deal with medical incapacity, not unsuitability for other reasons. However, it's entirely possible that everyone might tacitly agree to overlook the constitutional niceties in the interest of preventing a usurper from exercising the powers of the presidency even for a brief period.
If the circumstances of the murder were not clear (which would likely require that the usurper have the support of some or all of the president's Secret Service security detail or possibly use a subtle method such as poison), the new president would assume office and would try to use the power of the office to cover up the deed. The new president's success at this would depend on the existence and number of co-conspirators in Congress and the federal bureaucracy. The larger the conspiracy, the longer the new president could likely remain in office.
More questions on Quora:
TODAY IN SLATE
Slate Plus Early Read: The Self-Made Man
The story of America’s most pliable, pernicious, irrepressible myth.
Rehtaeh Parsons Was the Most Famous Victim in Canada. Now, Journalists Can’t Even Say Her Name.
Mitt Romney May Be Weighing a 2016 Run. That Would Be a Big Mistake.
Amazing Photos From Hong Kong’s Umbrella Revolution
Transparent Is the Fall’s Only Great New Show
Rehtaeh Parsons Was the Most Famous Victim in Canada
Now, journalists can't even say her name.
Lena Dunham, the Book
More shtick than honesty in Not That Kind of Girl.