Nicholas Trist
He Famously Bought California and was Infamously Fired for It

By the fall of 1847 the Mexican-American War had been raging for well over a year. The war was not popular with then President James Polk, and he was anxious to see it end. After General Winfield Scott took Mexico City, virtually ensuring victory for the United States, Polk sent Nicholas Trist to begin peace talks.
​
Trist seized the moment, and on February 2, 1848 he signed the Treaty of Guadalupe Hidalgo to end the war. The agreement also allowed the purchase of all Mexican territory north of the Baja Peninsula—California, Nevada, Utah, New Mexico, Arizona, Colorado, and parts of Oklahoma, Kansas, and Wyoming— for $15 million.
​
The problem was that Trist made the treaty decisions on his own without permission from the President. Polk had actually recalled Trist and requested that the negotiations take place in D.C. But Trist ignored the summons, made the deal, and then returned to Washington. Upon his arrival, Trist was unceremoniously fired for his acts of insubordination and his pay withheld.
Nonetheless, Polk decided to accept the treaty, and the Senate confirmed it on March 10, 1848. The size of the United States had nearly doubled with the stroke of a pen.
​
Trist had killed his own political career, so he worked in a series of office jobs for the next two decades. Finally, in 1871, he was appointed postmaster of Alexandria, VA and received all back pay from his negotiating days. Trist died in February, 1874, as a mostly forgotten figure in spite of his exceptionally significant contribution to the United States.
​
https://constitutioncenter.org/blog/the-man-who-delivered-california-to-the-u-s-and-was-fired-for-it