The move follows months of clashes with the White House over issues such as President Trump's refusal to divest his businesses and the administration's delay in disclosing ethics waivers for appointees.
Knowing he had little chance of renewing his post as watchdog head, he chose to accept a job offer from a nonpartisan advocacy group called the Campaign Legal Center.
"The great privilege and honor of my career has been to lead OGE's staff and the community of ethics officials in the federal executive branch", Walter Shaub Jr. wrote in a brief-but-pointed resignation letter he shared on Twitter.
Shaub, Jr., director of the United States Office of Government Ethics (OGE), will join Campaign Legal Center (CLC) as Senior Director, Ethics, beginning on July 19.
Nonetheless, Shaub, whose term was set to end in 2018, persisted in trying to do his job, becoming something of an unlikely bureaucratic hero.
In departing ahead of schedule, Mr. Shaub has handed Mr. Trump an opportunity to begin putting his mark on the agency overseeing the federal government's vast ethics program, including that of the White House.
This is breaking news.
The Shaub resignation is a big alarm bell that signals that there is a vast level of corruption within the Trump administration.
In March, Shaub criticized the White House for not properly penalizing White House adviser Kellyanne Conway for encouraging Americans to purchase Ivanka Trump's products during a television interview. He added that it was clear that the federal ethics program needs to be strengthened. After Shaub called one of the waivers "problematic" because it was not signed or dated, the White House fired back: "The Office of Government Ethics needn't be concerned with how the White House implements its own conflicts of interest policy, over which it has zero authority".
"As we said in January, President Trump's transparency theater' of disclosure failed to address the unprecedented conflicts of interest he brought to the White House", said Howard, of the Sunlight Foundation, in a statement.
And then on January 11, shortly before Inauguration Day, Shaub spoke out at the Brookings Institution, causing a stir when he said Trump's plan for avoiding conflicts of interest "doesn't meet the standards that the best of his nominees are meeting and that every president in the past four decades has met". The world of lawyers who have worked on government ethics issues is fairly small, he says, and the issues handled by the office are traditionally considered fairly non-partisan. While Shaub, who first went to work at OGE as a staff attorney in 2001, was able to be a watchdog and critic of presidents in his role, the agency lacks the ability to investigate or enforce. The Trump trust, according to Shaub, "isn't even halfway blind".