Shaub has accepted a position with the Campaign Legal Center, a nonpartisan Washington, D.C., organization of attorneys and election law experts.
In his letter of resignation to the president, Shaub said the office was "committed to protecting the principle that public service is a public trust", and employees must place loyalty to ethics over private gain.
"In working with the current administration, it has become clear to me that we need improvements to the existing ethics program", Shaub was quoted as saying in a statement on CLC's website.
Nonetheless, Shaub, whose term was set to end in 2018, persisted in trying to do his job, becoming something of an unlikely bureaucratic hero.
Although it's the top executive watchdog, the OGE has no authority over the White House or the president.
This is breaking news.
Trump Russia Must Stop Destabilizing Actions in Ukraine
He did not elaborate on what is so wrong with the "current situation", but Shaub has been sharply critical of Trump's approach to ethics compliance since the election.
More recently, the OGE director had to fight the administration for information on ethics waivers it had granted to various former lobbyists and other appointees, allowing them to communicate with their former employers while working in the federal government.
Shaub called for a harsher punishment for presidential advisor Kellyanne Conway after she flouted ethics rules by publicly endorsing Ivanka Trump's clothing line during a television appearance. The White House refused to do so, and Trump's family still runs his businesses, all while communicating directly with the President about them. Shaub also stated that he will be "broadening my focus to include ethics issues at all levels of government".
"This resignation, unfortunately, may weaken the work of a crucial federal agency that has been overwhelmed by ethics requests from the public and addressing the complex finances and associated conflicts from Trump's wealthy nominees", said Alexander Howard, the deputy director of the Sunlight Foundation.
Over the past several administrations, CLC has been instrumental in not only watchdogging public officials, but also shaping and advancing ethics legislation, including the Honest Leadership and Open Government in 2007, which created the Office of Congressional Ethics (OCE). And when it comes to picking lawyers, Trump is more inclined to pick loyalists who love brawling in court, even if it's on behalf of a losing cause.
Mr. Shaub, who served for about a decade as a career civil servant at the agency before being appointed director, said his role had always been politically neutral.