Zmajević was born in Perast, in the Bay of Kotor, at the time part of the Republic of Venice in late July 1628. The Zmajević family hailed from Njeguši; when the last members of the Crnojević family left Principality of Zeta, Nikola Zmajević and his cousins Ivaniš and Vučeta moved to Kotor. Becoming appealed and somewhat wealthy, the family quickly converted from Christian Orthodoxy in favor of Roman Catholicism, with the three marrying Catholic girls and having their children baptized in the Latin Rite. Andrija's father was Nikola Milutin Zmajević. After Andrija's birth in 1628, soon came Andrija's brothers, Ivan and Krsto. Krsto Zmajević would become a very famous person, on more than one occasion as the Captain of Perast. Andrija remained very akin towards his family origin throughout his life. The Franciscans held an elementary school since 1638 in the private home of the Mazarović family. After attending this poor school for a short time, Andrija moved to Kotor to earn some better education. As the first man of the Congregation for Propaganda of Faith he travels to Rome to their Institution "Urbino", where he earned a PhD in Philosophy and Theology. Andrija quickly rose to prominence in Rome. In July 1651 at the request of Jeronim Pastrić of Split, he was accepted into the Brotherhood of Saint Geronimo along with eight other young priests, all of whom come from Dalmatia. Andrija begins his literal career there, as a student. When the ex-Swedish Queen Christine moved to Rome and paid an honorary visit to the College for Propagation of the Faith, Andrija was one of the 42 young students that dedicated poems and speeches to her in 26 different languages. On 15 April 1654 the Ottoman Turks from Herzegovina under the leadership of Mehmed-pasa Rizvanbegović assaulted Andrija's hometown Perast; his brother Krsto Zmajević heroically defended the city. Andrija wrote a poem Boj peraški dedicated to celebrating this event. Some half a century ago the last remaining copy of this work was lost. He returned to his home and became the abbot of the local monastery of St. George and the pastor of Perast. In 1664 he became the vicar of Budva bishopric and in 1671 the titular archbishop of Bar and primate of the Kingdom of Serbia. As both Bar and the rest of Montenegro were under Ottoman control, Zmajević resided in Perast where he built a grand palace called Biskupija. The palace was frescoed by his protégé, the talented local painter Tripo Kokolja. Biskupija also contained one of the most significant libraries in the eastern Adriatic. He also supervised the building of the high bell tower of the parish church and of many other churches round the Bay of Kotor. Zmajević was interested as well in classical antiquities and collected Roman inscriptions and ruins. Although a high Catholic prelate Zmajević remained very tolerant and highly esteemed by both the Catholics and the Orthodox, among the latter by Arsenije III Čarnojević, the Serbian patriarch, also of the Njeguš clan. During the Great Turkish WarPope Clement X, in making contact with the Serbian Orthodox Patriarch of Peč, Arsenije III Čarnojević, employed the offices of both the Serbian Vladika of Montenegro, Ruvim III Boljević and the Catholic Archbishop of Bar, Andrija Zmajević. He died in 1694 and was buried in the chapel by the palace that he erected.
Work
He also collected epic and lyric folk songs and transcribed works of the poets of Dubrovnik, notably Gundulić. His only published work, the song "Od pakla" saw the light of day in Venice in 1727. Almost all of his other works remained in manuscripts. He wrote:
Hronika or Ljetopis crkveni illustrated by himself and his countryman Tripo Kokolja.
Svadja Lazarevih kćeri, Brankovice i Miloševice
Peraški boj.
Slovinskoj Dubravi
Tripu Škuri
Zmajević wrote both in Cyrillic and in Latin scripts. Zmajević called the language in which he wrote "Slavic". He justified his decision to write in "Serb letters" since "the whole of our nation uses it". His inspiration comes both from current events and from Serbian history and epic so that he often mentions Saint Sava, Nemanja, Miloš Obilić and other historical and legendary figures.