Established by the U.S.-Hungarian billionaire, the group faced restrictions on non-profit organizations under a law dubbed the "Stop Soros" bill.
George Soros' foundation said Tuesday it would close its office in Budapest and move to Berlin, leaving what it called "an increasingly repressive political and legal environment" in Hungary.
The pro-democracy group said it was pulling out after the country's government announced restrictions on non-profit organizations under a law dubbed the "Stop Soros" bill.
Prime Minister Viktor Orban, who won a landslide election victory last month, has repeatedly accused the Hungarian-American billionaire and his organization of encouraging migrants and undermining the national culture.
Soros' Open Society Foundations (OSF) organization said it would continue to support human rights work in Hungary as well as projects linked to arts, media freedom, transparency, education and health care.
But it would move its Budapest-based international operations and staff to Germany.
"The government of Hungary has denigrated and misrepresented our work and repressed civil society for the sake of political gain, using tactics unprecedented in the history of the European Union," OSF president Patrick Gaspard said in a statement.
Opposition and rights groups have long said that a departure of the OSF would mark a milestone in a slide towards authoritarian rule in Hungary and go against the principles of the European Union — a charge dismissed by the government.
Hungarian government spokesman Zoltan Kovacs declined to comment.
Orban has increased his control over the media and put allies in control of formerly independent institutions, while his stand on refusing to accept large numbers of migrants in Hungary has also put him in conflict with the E.U.
Orban and Soros have clashed over the 2015 European migration crisis. Orban says Soros is out to undermine Europe's cultural identity while the billionaire has accused him of running a mafia state.
Before the election, Orban's political campaign vilified Soros, and his activity supporting civil society, on billboards nationwide.
Open Society said the campaign had "invoked anti-Semitic imagery from World War II." The government has repeatedly denied this.
The legislation is expected to be one of the first laws passed by the new parliament. It would allow the interior minister to ban any non-profits deemed to pose a "national security risk." It would also impose a 25-percent tax on foreign donations to non-profits that back migration.