The university's Institute of Archaeology bought the two ancient portraits of Egyptian mummies in 1979 along with seven other paintings for the total sum of 220,000 francs, it said in a statement.
In 2015 the university's own investigations revealed that the paintings once belonged to successful Berlin publisher Rudolf Mosse and were unlawfully seized by the Nazis from Mosse's daughter and son-in-law in 1933.
The university then contacted the heirs of the Mosse family itself.
“With a view to finding a solution that accounts for the particular circumstances the heirs agreed to make a financial contribution to the teaching and research work of the University of Zurich in exchange for the two objects,” the university said.
Prior to last year, the provenance of the paintings was unknown, it added.
The university had bought them from the widow of German novelist Erich Maria Remarque, author of famous First World War novel All Quiet on the Western Front, who was himself persecuted by the Nazis and left Germany to live in Switzerland.
“Despite intensive research on the provenance it has neither been possible to establish when and where Erich Maria Remarque had purchased these two objects nor to identify possible prior owners,” said the university.
“What is certain, however, is that the objects formerly belonged to the collection of Rudolf Mosse and were part of the assets the couple Felicia and Hans Lachmann-Mosse had forcibly been deprived of by the National Socialists on racial grounds.”
According to the Mosse Art Restitution Project, which is seeking to recover pieces of art confiscated by the Nazis, the Lachmann-Mosse family were outspoken critics of Hitler and became a symbol of the so-called 'Jewish press' hated by the Nazis.
Following Hitler's ascent to power in 1933 the couple were forced to leave Germany and the Nazis took control of family property including their art collection.
"The Mosse Art Restitution Project would like to thank the Institute of Archaeology and the University of Zurich for reaching out to the Mosse heirs and restituting the two pieces," it said.
The case is one of many examples of Nazi-looted art in Switzerland.
Earlier this month a Modigliani painting allegedly looted by the Nazis was sequestered in Geneva after the Panama Papers leak revealed the identity of its owner.
And in October a painting which its Jewish owner was forced to sell by the Nazis in 1938 turned up in the art collection of a prominent Swiss politician.
In December a German taskforce found that several paintings in a huge art collection bequeathed to Bern's Fine Art Museum were looted.
The museum has said it will go ahead with a planned exhibition of other works from the collection of Cornelius Gurlitt – a powerful art dealer during the Third Reich – later this year.
It would present the collection "within a historically and scientifically contextualized framework", including details on efforts to determine the origin of some of the pieces, it said in a statement earlier this month.
A 1998 agreement signed by 44 countries including Switzerland sets out how to deal with Nazi-confiscated art.
In the case of artworks not yet returned to their pre-war owners or heirs, “steps should be taken expeditiously to achieve a just and fair solution,” it says.