Music in Medieval Scotland includes all forms of musical production in what is now Scotland between the fifth century and the adoption of the Renaissance in the early sixteenth century. The sources for Scottish Medieval music are extremely limited. There are no major musical manuscripts for Scotland from before the twelfth century. There are occasional indications that there was a flourishing musical culture. Instruments included the cithara, tympanum, and chorus. Visual representations and written sources demonstrate the existence of harps in the Early Middle Ages and bagpipes and pipe organs in the Late Middle Ages. As in Ireland, there were probably filidh in Scotland, who acted as poets, musicians and historians. After this "de-gallicisation" of the Scottish court in the twelfth century, a less highly regarded order of bards took over the functions of the filidh and they would continue to act in a similar role in the Scottish Highlands and Islands into the eighteenth century.
In the Early Middle Ages there was a distinct form of liturgical Celtic chant. It is thought to have been superseded from the eleventh century, as elsewhere in Europe, by the more complex Gregorian chant. The English Sarum Use was the basis for most surviving chant in Scotland. From the thirteenth century, Scottish church music was increasingly influenced by continental developments. Monophony was replaced from the fourteenth century by the Ars Nova, a movement that developed in France and then Italy, replacing the restrictive styles of Gregorian plainchant with complex polyphony. Survivals of works from the first half of the sixteenth century indicate the quality and scope of music that was undertaken at the end of the Medieval period. In the High Middle Ages, the need for large numbers of singing priests to fulfill these obligations led to the foundation of a system of song schools. The proliferation of collegiate churches and requiem masses in the Late Middle Ages would have necessitated the training of large numbers of choristers, marking a considerable expansion of the song school system. A stress was placed on the technique of Faburden, which allowed easy harmonisation according to strict rules.
The captivity of James I in England from 1406 to 1423, where he earned a reputation as a poet and composer, may have led him to take English and continental styles and musicians back to the Scottish court on his release. James III founded a Chapel Royal at Restalrig near Holyrood and his son James IV refounded the Chapel Royal within Stirling Castle, with a new and enlarged choir. James IV was said to be constantly accompanied by music, but very little surviving secular music can be unequivocally attributed to his court.
There is evidence that there was a flourishing culture of popular music in Scotland during the Late Middle Ages, but the only song with a melody to survive from this period is the "Pleugh Song". Some surviving Scottish ballads may date back to the Late Middle Ages and deal with events and people that can be traced back as far as the thirteenth century. They remained an oral tradition until they were collected as folk songs in the eighteenth century.