Mr. West, a former Justice Department official and the brother-in-law of Senator Kamala Harris, the California Democrat who is running for president, said he was hitching his reputation to Uber and its changes.

“I had a reputation that I was also putting on the table, right?” he said in a recent interview.

A native of the Bay Area, Mr. West graduated from Harvard University and Stanford Law School. He rose to prominence as an assistant attorney general in the Obama administration, during which he urged the Justice Department to stop defending the Defense of Marriage Act and worked to reduce the number of detainees in the military prison at Guantánamo Bay.

In 2014, he became general counsel of PepsiCo, where, he said, he learned how to operate in a Fortune 50 company. Then in 2017, Mr. Khosrowshahi came calling.

At the time, Uber was reeling from the ouster of Travis Kalanick as chief executive and the aftermath of an investigation into its workplace, amid other issues. Mr. Khosrowshahi was tapped to stabilize the company and eventually take it public. Over several dinners in New York, he pitched Mr. West on the idea of turning Uber into a more self-critical company.

Uber needed someone with “a great amount of negotiation prowess and relationships,” Mr. Khosrowshahi said. “He’s got both.”

Mr. West jumped ship. “There was nothing I was going to do that was going to fundamentally change the trajectory” of PepsiCo, he said.