President Obama at a news conference after the end of the Group of 20 summit in Hangzhou, China, on Sept. 5. (Qilai Shen/Bloomberg News)

PRESIDENT OBAMA’S 11th and final trip to Asia looked rude and ragged from the outside. It began with a botched arrival in China, featuring a missing airline staircase, that some interpreted as a deliberate snub of the president. Then came an unmistakable insult from Philippine President Rodrigo Duterte, who obliged Mr. Obama to cancel their bilateral meeting by calling him the Tagalog equivalent of “son of a whore.” The kerfuffle was particularly troubling because it came as China marshaled ships near a shoal whose defense from Beijing’s incursions has been a focus of recent U.S.-Philippine cooperation.

Administration officials insisted that the tour was better than it looked. Among other things, they cited the mutual commitment of Mr. Obama and Chinese President Xi Jinping to a global climate change accord, as well as the confirmation following a meeting with South Korea’s president that a U.S.-supplied missile defense system will be deployed despite Chinese objections. Still, it was striking that Mr. Obama’s most substantive meetings appeared to be with Russia’s Vladi­mir Putin and Turkey’s Recep Tayyip Erdogan, with whom he bargained over the wars in Ukraine and Syria. Even on a trip meant to showcase the U.S. commitment to Asia, the crises elsewhere in the world intruded.

To a substantial extent, that has been the story of Mr. Obama’s “pivot” of U.S. foreign policy toward Asia, which was meant to be a major part of his foreign policy legacy. In Laos, where he was the first U.S. president to visit, Mr. Obama summed up some of its achievements: new defense agreements or collaborations with Japan, Australia and South Korea; the deployment of more military capability to the region; improved relations with former adversaries such as Burma and Vietnam, and the 12-nation Trans-Pacific Partnership trade deal.

Those were meaningful steps in what, overall, has been a sensible strategy. However, they are likely to pale in the historical record of Mr. Obama’s presidency next to the nuclear accord with Iran and the catastrophic wars in Syria and Iraq — for better and for worse. The centerpiece of the policy, the TPP, would be a major accomplishment, but Mr. Obama sounded suspiciously like the parrot owner in the Monty Python sketch as he insisted that it was not, in fact, dead, despite its rejection by both major-party presidential candidates and key congressional leaders.

Mr. Obama would do his successor, and U.S. standing in Asia, an enormous service if he somehow managed to revive and pass the treaty in Congress’s lame-duck session after the election. Otherwise, he will leave the next president with the unresolved challenge of how to cement U.S. ties to the states in the region as Chinese power grows. Even with the TPP, the next president would face an increasingly aggressive China attempting to establish dominion over most of the South China Sea and an increasingly dangerous North Korea building nuclear warheads and missiles capable of reaching the U.S. homeland. For all its ambition and incremental achievements, an Asia policy that leaves behind that much trouble will be hard to regard as a success.