In a pique of anger over Secretary of Defense Jim Mattis’s resignation letter, President Trump announced over the weekend that Mr. Mattis would be out of a job on Jan. 1, instead of the end of February, as the secretary had recommended in order to provide a stable transition. The hunt for his replacement is now on, setting up a rushed conversation in the news media, and then in the Senate, over what sort of person should follow Mr. Mattis in leading the Pentagon — and with it, a debate about the state of civil-military relations. Given the way the public praised Mr. Mattis, and then bemoaned his departure, we have some work to do.

President Trump originally picked Mr. Mattis because, according to reports, he looked the part of a battle-hardened warrior, and had even been called “Mad Dog” by an enterprising journalist. That Mr. Mattis was equally known for lugging around a footlocker of Western novels and stoic philosophies, testifying in favor of greater spending for diplomacy, standing Christmas watch for enlisted Marines and writing thoughtfully about civil-military challenges 45 years into America’s experiment with an all-volunteer force were, evidently, matters of indifference to the commander in chief.

The president’s political opponents, including me, heaved a huge sigh of relief at Mr. Mattis’s nomination; we knew him as an intelligent, measured leader. But some among us, on both sides of the political divide, went further, anticipating that the recently retired general (and other veterans in the new administration) would save us from the president and his policies — even though, for better or worse, the American people had voted him into office on the basis of those policies.

Some people also imagined that Mr. Mattis and others would stand in the way of the president should he make ill-advised or apocalyptic military decisions — for example, some questioned whether the Defense Department would carry out a nuclear launch order against North Korea, even though not doing so would dangerously undermine civilian control of the military. Many, in other words, hoped that Mr. Mattis would be willing to subvert American democracy in order to check a bad president.