I googled the hymn today to find out more about it. Joseph Gilmore wrote this hymn in 1862 during one of the darkest times of the Civil War. He was preparing for a sermon on Psalm 23, and the three words "He leadeth me" wouldn't allow him to pass over them. He was gripped by the idea that God Himself leads us. Over a conversation with his wife and family about this idea he penned the words to this hymn. They were (unbeknownst to him) sent to a magazine by his wife, published, and later put to music by William Bradbury in 1864. It wasn't until 1865, when he attended a baptist church and opened the hymnal to the correct page and found his hymn, that he discovered it had been put to music and was being sung in churches.
"He leadeth me, O blessèd thought!
O words with heav’nly comfort fraught!
Whate’er I do, where’er I be
Still ’tis God’s hand that leadeth me.
He leadeth me, He leadeth me,
By His own hand He leadeth me;
His faithful follower I would be,
For by His hand He leadeth me.
Sometimes mid scenes of deepest gloom,
Sometimes where Eden’s bowers bloom,
By waters still, over troubled sea,
Still ’tis His hand that leadeth me.
Lord, I would place my hand in Thine,
Nor ever murmur nor repine;
Content, whatever lot I see,
Since ’tis my God that leadeth me.
And when my task on earth is done,
When by Thy grace the vict’ry’s won,
E’en death’s cold wave I will not flee,
Since God through Jordan leadeth me.