The chivalrous enemy is a phrase from WWI, and undoubtedly earlier. See, for example, 10 Stories of Chivalry and Compassion from the Battlefields of World War One and The Creative Dialectic in Karen Blixen's Essays. (Karen Blixen's pen name was Isaac Dinesen, who wrote Out of Africa, which was made into a film starring Meryl Streep and Robert Redford.)
The author of the book about Karen Blixen, Marianne T. Stecher, writes that
General Paul von Lettow-Vorbeck was admired and respected by the
English forces in Africa "not only as a skillful commander and brave
soldier, but because he was such a chivalrous enemy."
There is much more -- about the resemblance of "wild game hunting to honorable, inspiring warfare' and warfare in which the opponents knew each other personally.
This seems incomprehensible today, but it was a holdover from earlier times when war-like classes and tribes were entwined by centuries of intermarriage and shifting alliances, and when they were not warring for real, competed at tournaments, the Super Bowls of their day.
The easiest story to summarize from the first link I gave is that of the Kaiser and Captain Campbell.
Captain Robert Campbell was captured by the German forces in northern
France on August 24, 1914. Like many others, he was sent to a POW camp
in Magdeburg, Germany, and it was there that he got word that his
mother was dying of cancer. He petitioned Germany’s Kaiser Wilhelm II
for leave to go visit his mother one last time before her death and
miraculously, he was granted two weeks leave from the POW camp.
After spending a week with his mother, the Captain returned to Germany, as he had promised, and turned himself in. When he got back to the prison camp, he and several others dug their way to freedom and got almost to the border of the Netherlands before being recaptured.
There is much more to be said about chivalry and the chivalric code; see for example Wikipedia. Note that one could be a chivalrous enemy today and a fierce and cruel enemy tomorrow, and that being a chivalric enemy could be interpreted as treason. See the story of Nurse Cavell in the first link.