Horatio seemed to be Hamlet's only true friend throughout the course of the play. Where many men befriended Hamlet, they later either betrayed or neglected him. Horatio, however, stays Hamlet's side throughout the course of the play, never once questioning his motives or principles.
Throughout the play, Horatio is seen as constantly looking out for Hamlet's well-being and putting any assignments from Hamlet before himself. In ACT IV, SCENE VI, Horatio receives a letter from Hamlet that tells about his journey with a group of pirates. The letter also mentions that Horatio make haste in coming to see him and allow the messenger a way to send another letter that Hamlet has written for King Claudius. Horatio greets the sailor who brings the letter and then, after reading it, continues with the orders of Hamlet, even at the risk of being caught.
Horatio actually seems to have been a long-time friend of Hamlet.
From the beginning of the play his main goal has been to protect Hamlet. For instance, when Hamlet is about to follow his father's ghost, Horatio immediately becomes worried and points out to him, "What if it tempt you toward the flood, my lord, or to the dreadful summit of the cliff..." (I.IV.76-77) In this line it seems obvious that Horatio has a definite concern for Hamlet's wellbeing. His motivation springs out of his love and determination to protect and remain loyal to Hamlet.
Horatio is somewhat of a follower in the play, who never takes much action, unless instructed to do so by Hamlet or the King. Oddly enough, there are never any real obstacles in Horatio's way. He never mentions that he has any other kind of business that he must attend and allows Hamlet's situation to take precedence. Surprisingly, the king...