Diogo Dias Melgás was born in Cuba, Alentejo, on 14 April 1638. He was a choirboy at the Colégio da Claustra in Évora in 1646. He took holy orders at the Cathedral of Évora, where he stayed the rest of his life, being a student of Manuel Rebelo, and holding the position of mestre de capela for about 30 years. He died blind and extremely poor on 3 February 1700. He was the last of the great Portuguese polyphonic masters, who began to flourish in Évora in the second half of the sixteenth century.
A large part of Melgás's work is lost. The surviving works - masses, motets, graduals - are kept in the archives of the Cathedrals of Évora and Lisbon, and were published in modern notation by the Fundação Calouste Gulbenkian in 1978 (Opera Omnia, Portugaliae Musica XXXII).