Despite multiple changes to the lyrics the hymn has been traced back to the time prior to 1673. The earliest known version was found among a collection of worldly and spiritual songs in a manuscript of unknown provenance acquired in Münster around 1860 that dates (based on information found in it) to the time period 1662-1673:
Bernhard Hölscher, "Deutsche geistliche Lieder aus der ersten Hälfte des 17. Jahrhunderts." Oesterreichische Vierteljahresschrift für katholische Theologie, Vol. 4, 1865, pp. 221-256.
On p. 232 one finds "Suspirium ad Jesum" (sigh to Jesus), the first stanza of which reads:
Schönster Herr Jesu, Herrscher aller Herren,
Gottes und Mariä Sohn,
Dich will ich lieben, dich will ich ehren,
Meiner Seele Freud und Won
Hölscher glosses "Schönster" as "Liebster" (dearest), although I am not sure this is justified based on a diachronic dictionary of German that I consulted. My translation:
Dearest Lord Jesus, Ruler of all lords,
Son of God and Son of Mary,
You I shall love, you I shall honor,
The joy and delight of my soul
Various details in the manuscript led Hölscher to attribute the manuscript to a student at the Jesuit school in Münster. He also suspected this may not have been the original version but was unable to find an earlier variant. Subsequent authors considered a Jesuit origin of the hymn likely based on particular choices made in the lyrics and the general fact that the Jesuits promoted German hymns to facilitate greater engagement by the congregation during church services.
The hymn first appeared in print in the hymnal for the diocese of Münster published in 1677.
It appears in an appendix of "three selected beautiful new hymns" (Zuſatz Drey ſchöner außerleſener
Newer Lieder) on pp. 576-577.
This and the fact that it is not listed in the index suggests to me that this was a very late
addition to the hymnal and that its temporal origin was close to the time of publication, suggesting
an origin nearer to 1673 rather than 1622. The title page of the hymnal reads:
Münſterisch
Geſangbuch /
Auff alle Feſt vnd Zeiten
deß gantzen Jahrs / in der Kir=
chen bey dem Ampt der H. Meß / vor=
vnd nach der Predig / auch in Proceſſionen
vnd Bittfahrten / in Geiſtlichen Bruder=
schafften vnd Versamblungen / auch in der
Chriſtlichen Lehr / vnd in den Schulen / wie
auch zu Hauß / oder im Feldt / beym Reiſen
oder arbeiten gar nützlich zu gebrauchen.
Jetzo auffs new überſehen / vnd
mit vielen schönen / alten vnd newen
Geſängen auß vnterschiedtlichen bewehrten
Geſangbüchern vermehret / vnd in diese
Ordnung gebracht.
16 ✠ 77.
Gedruckt zu Münſter in Westphalen /
Bey Dietherich Raeßfeldt.
My translation: "Münsterian hymnal which can be used advantageously for all holidays and seasons throughout the year, in churches during the office of Holy Mass, before and after the sermon, also in processions and pilgrimages, in religious orders and convocations, also for Christian instruction and in schools, as well as at home or in the field, while traveling or working. Now newly revised and augmented with many beautiful old and new hymns from various established hymnals and brought into the present order. 1677. Printed at Münster in Westphalia by Dietrich Raesfeld"
Somewhat unusual for a hymnal, the melodies for the hymns were collected in a separate volume by the church musician Rudolph Nagell (who may also be the composer of the original melody for this hymn):
Rudolph Nagell, Melodeyen über die Geſänge und Psalmen deß Münsterischen Gesang=Buchs [...] Münster: Dietrich Raesfeld 1677.
I have been unable to find an online scan of this volume. The hymn seems to have enjoyed some popularity as it spread to other dioceses. In a 19th collection of German folks songs it is included under the title "Jesus über Alles", quoted from hymn no. 46 in the 1695 hymnal for the diocese of Fulda (Catholisch Manual Oder New Füldisch Gesang-Buch [...]. Fulda: Simon Zeiler 1695), which is a revised version of the Fulda hymnal of 1673.
Franz Ludwig Mittler (ed.), Deutsche Volkslieder. Marburg and Leipzig: N. G. Elwert'scher Verlag 1855, p. 780
Except for a small image of its title page I have not been able to locate a scan of this hymnal. Thereafter the hymn seems to have disappeared from hymnals. It reappeared in the 19th century in a collection of Silesian folks songs, where it bears the title "Jesus über Alles" and appears with altered lyrics and an entirely new melody, thought to be an old Silesian folk melody.
Hoffmann von Fallersleben and Ernst Richter (eds.), "Schlesische Volkslieder mit Melodien." Leipzig: Breitkopf und Härtel 1842, p. 339
The authors collected material from dozens of contributors during the years 1839 and 1840, in this case a person from the County of Glatz in the Prussian Province of Silesia. In 1849 the German Christian weekly Volksblatt für Stadt und Land (editor-in-chief Philipp von Nathusius) published an article including the hymn in issue 82. Without citing sources, the article alleged that it originated with crusaders and pilgrims to the Holy Land in the 12th century. It is therefore not surprising that the hymn first appeared in English as "Crusader's Hymn" in
Richard Storrs Willis, Church Chorals and Choir Studies. New York: Clark, Austin, & Smith 1850, p. 193.
Here the hymn appears with German and English lyrics side by side, the latter the work of an unnamed translator. German lyrics and melody match those in the collection of Silesian folk songs. The retention of the original German lyrics makes sense given that German Sunday services were common in regions with a heavy influx of German immigrants. According to
John Julian, A Dictionary of Hymnology. New York: Charles Scribner's Sons 1892, p. 1016,
Willis did not know who provided the English translation. Julian notes two further English translations, one due to E. Massie from 1867, and the other by J. A. Seiss dating to 1873. Corresponding scanned references I could find are:
"The Crusaders' Song." In Edward Massie, Sacred Odes Vol. II. London: William Hunt and Company 1867, p. 203
"A Song to the Saviour." In Joseph Augustus Seiss, Recreation Songs. Philadelphia: G. W. Frederick 1878, pp. 18-19
The 1849 article in Volksblatt für Stadt und Land mentioned earlier is presumably the publication where Danish pastor J. F. Fenger encountered the hymn; the Danish Wikipedia only refers to a German religious magazine. In August of 1850 he urged his friend Bernhard Severin Ingemann to create Danish lyrics to accompany the melody. Ingeman's lyrics are based only very loosely on the original. He seems to have been inspired more by the alleged use of the hymn by pilgrims, using the motif of a pilgrim's journey. The result was published as "Pilgrimssang" in Dansk Kirketidende, September 8, 1850.
The Danish hymn led to a Swedish version "Härlig är jorden" in 1884, which is supposedly also popular at funerals. The Swedish version inspired a Dutch version "Eeuwen geleden" which dates to 1915.
In the early 20th century, the hymn was reintroduced into German hymnals, both Protestant (Deutsches Evangelisches Gesangbuch, 1915) and Catholic (Kirchenlied, 1938), albeit with somewhat different lyrics. It is included in the current standard German hymnals, where it appears as No. 403, "Schönster Herr Jesu", in Evangelisches Gesangbuch (Protestant) and as No. 364, "Schönster Herr Jesu", in Gotteslob (Catholic). The Catholic version closely follows the version from 1677, whereas the Protestant version provides a choice of the older Münsterian melody and the newer Silesian melody.