The hymn had been transcribed by him as a testimony to his faith two days before his execution, apparently from memory, on to a piece of paper which was found in his pocket afterwards, without any information as to its original author. Major Andre was executed on 2nd October, 1780, exactly four years after this hymn was published in the "Gospel Magazine" (October, 1776) under a pseudonym "Sylvestris" used by the author, Jehoida Brewer.
Andre was Benedict Arnold's case officer and he nearly escaped behind British lines with the information Arnold had given him on the fort at West Point, NY. Had Andre made it to British territory, the classified information he obtained from Arnold might have enabled the British to win the war.
It’s interesting history. I just read more about it. Thank you for sharing.