He was closely associated with the Illuminati of Adam Weishaupt while a student in Ingolstadt, and the ideals of the French Enlightenment were a strong influence on his philosophy as a musician as corroborated by his famed Zibaldone or "Notebooks" compiled toward the end of his career.
Shortly thereafter, he took music lessons with Carlo Lenzi, and later with Ferdinando Bertoni.
In 1805 he founded the Bergamo Conservatory; then known as the Lezioni Caritatevoli di Musica.
He died in Bergamo and is buried in the Basilica di Santa Maria Maggiore there, just in front of the tomb of his famous pupil.
Mayr's works, among which there are almost seventy operas, are rarely performed today.