Originally, the Horn was lost in the battle of Jericho Hill. Roland had given the Horn to Cuthbert Allgood, who blew it until he died. Roland neglected to obey his friend's final wishes and left the Horn at Jericho Hill.
Upon the resumption of his quest to reach the Dark Tower, Roland is once again in possession of the Horn. In this iteration of the cycle, Roland remembered to retrieve the Horn at Jericho Hill. His possession of the Horn may be a sign that Roland is closer to his redemption.
Stephen King's inspiration for the Horn of Eld almost certainly comes from the French poem, "The Song of Roland". In it, there is a battle that bears some similarities to the Battle of Jericho Hill. The Roland mentioned in the poem dies when he calls for reinforcements, from the exertion of blowing the horn.