The nineteen year-old Mozart was entrusted by the archbishop of Salzburg to compose The King Shepherd on the occasion of the passage of the archduke Maximilian, the last-born son of the empress Maria Theresia von Österreich.
The first execution happened in front of the archduke, at the Archiepiscopal Palace, and it was conducted by the author.
The definition ''serenade'', attributed to the composition by the same Mozart, is probably due to the absence of a stage installation with which the first representation was programmed.