Moore was already a bad general-election candidate because of his far-far-right views. He had twice been removed from the Alabama Supreme Court, once for refusing to take down a two-ton Ten Commandments monument he had installed in the court building, a second time for not abiding by the United States Supreme Court’s decision to legalize gay marriage. He became a much, much worse candidate when, after winning the G.O.P. nomination, multiple women credibly accused him of sexually propositioning and in some cases molesting them years earlier, when they were young teenagers. (Moore denied all the accusations.) Many prominent Republicans, having reluctantly resigned themselves to supporting Moore once he became the nominee, abandoned him after the pedophilia claims surfaced. McConnell warned that Moore was likely to face an ethics inquiry and expulsion if he came to Washington. Shelby announced that he wouldn’t vote for Moore and would instead cast his ballot for a write-in candidate. He urged others to do the same, and in the end, close to 23,000 Alabamians did. Moore lost by 21,000 votes.

One morning in late January, the principal beneficiary of the 2017 fiasco was sitting in a conference room of the Democratic Senatorial Campaign Committee on Capitol Hill. “My brain is really pickled,” Doug Jones apologized. He had been spending most of his recent days and, often, nights in the Senate chamber, serving as a juror in Trump’s impeachment trial; at that point, Jones said, he had taken 240 pages of longhand notes on the proceedings. A week later, he would vote to convict Trump.

More so than other Democratic senators who represent states Trump won in 2016, like Kyrsten Sinema of Arizona or Joe Manchin of West Virginia, Jones has been a willing participant in his party’s fights with the president. He voted against Brett Kavanaugh’s Supreme Court confirmation and a bill that would have stopped the federal funding of abortions; he voted for a resolution canceling Trump’s declaration of a national emergency at the Southern border. A popular theory in certain Democratic circles is that Jones, knowing that his electoral triumph was situational and that his time on Capitol Hill is likely to be short, is taking a YOLO approach to his Senate career. Others suspect that Jones — who before his election to the Senate was best known for his work as a U.S. attorney successfully prosecuting two members of the Ku Klux Klan for their roles in the 1963 Birmingham church bombing — is angling to become attorney general in the next Democratic administration. “I think there are a lot of people that see me that way, but I don’t see it that way,” Jones says. “My explanation is that I’m voting my conscience.”

Unlike his Republican would-be opponents, Jones does not relish the opportunity to talk about national politics. He has endorsed Joe Biden in the Democratic presidential race and has said that he plans to support whoever becomes the Democratic nominee, but when I asked him if that extended to Bernie Sanders, he hesitated. “It’s going to be hard for me to give a full-throttle endorsement of Bernie,” Jones said, “because there are so many things I disagree with him on, and he is really, in my view, an independent person and not a real Democrat.”

Jones has a surprisingly robust approval rating of 41 percent (with 35 percent disapproval) and an enviable war chest: By the end of last year he had raised $7.5 million — more money than all his Republican opponents combined. He has led a bruising effort to overhaul a state Democratic Party that in 2017 was, in his telling, “a pretty dysfunctional, nonworking shell of an entity” with a meager budget, a tiny staff and no infrastructure. And he now expects the party to help with get-out-the-vote and other efforts — something his campaign had to run and pay for itself last time.

But the reality is that none of this is likely to be enough to save him come November. Before Jones’s victory, Democrats had not won a statewide federal election in Alabama since Shelby was elected to the Senate in 1992. (He switched parties two years later.) Republicans are confident 2017 was an aberration and note that Trump himself will be on the ballot this year. Brent Buchanan, who runs the Republican polling firm Cygnal, says: “A sack of soybeans, so long as it has an R on its label, will beat Doug Jones in 2020.” But will Alabama Republicans pick the right sack of soybeans?