A biologist, he led a campaign to save the Danube River from the ecologically-devastating Gabcikovo-Nagymaros dam.

In 1981 János Vargha, a biologist by training, studied the Gabcikovo-Nagymaros dam project under construction on the Czechoslovakian-Hungarian section of the Danube River. After writing a report critical of the project, Vargha was censored by the Hungarian authorities. This prompted Vargha to further investigate the effects of the dam. He revealed that the cost-benefit calculations were seriously distorted by the planners and that the ecological damage from the Nagymaros dam alone would be irreversible: 150,000 acres of forest would be submerged, the habitat for some 200 species of flora and fauna would be devastated, even the drinking water supply for more than three million people could be destroyed. The Nagymaros dam would transform the picturesque Danube Bend to an industrial landscape.

In 1984 Vargha established Duna Kör (Danube Circle), an association that would work to oppose the Nagymaros project. Despite a ban on public activities regarding the dam, Duna Kör managed to publicize the issue. In February 1986 Vargha organized a nature walk around the dam site. His group was met by government police wielding truncheons and tear gas. Vargha was then dismissed from his editorial job with a scientific magazine.

Duna Kör kept up the pressure, organizing demonstrations and an international conference on the issue in cooperation with the World Wildlife Fund in 1988. The Danube became a nationwide concern and 150,000 people signed a petition demanding a referendum on the dam. In 1989 Hungary canceled the Nagymaros dam. In neighboring Czechoslovakia, however, construction of the massive Gabcikovo dam was almost finished when the Communist government fell. Despite strong protests from Hungary, Czechoslovakia, decided that it was too late to abandon the project. In 1992 Czechoslovakia started to operate the Gabcikovo dam and demanded that the Nagymaros dam be completed to facilitate Gabcikovo's peak load operation.

In 1997 the Court of Justice at the Hague concluded that there was no longer any point in building the Nagymaros dam. However, the Hungarian government ruled by socialists ignored the court's ruling and decided to complete the dam projects. Demonstrations by Duna Kör and other groups contributed to the failure of the socialists in recent elections.

In July 1998 Vargha was appointed chief advisor on environmental politics to the new Hungarian government. In August Hungary suggested a new round of negotiations with Slovakia (which had split from the Czech Republic in 1993) about the implementation of the Court's decision.