To answer this question, you have to think about their back stories a little bit. Hamlet was off in school at Wittenburg, and Macbeth was an officer at war. Hamlet returns from school because he finds out his father has died, ostensibly of natural causes, and Macbeth returns after a victory. Hamlet is grieving and confused, something that doesn't improve when his mother marries his father's brother. Macbeth is not confused or grieving, but he has a very high opinion of himself from his recent triumph. Macbeth has a wife who wants him to reach the highest status possible. Hamlet has a girlfriend whose loyalties are divided between him and her father -- and her brother, to a lesser extent. The point is, they're pretty different guys.
Hamlet's motivation comes from his father's ghost telling him that he was murdered. Macbeth's also comes from supernatural forces, the three witches. In both plays, these supernatural elements could be intervening simply to wreak havoc. Hamlet even questions whether the ghost is really his father. Macbeth, though, doesn't question the witches' motivation because what they promise him is power and the status his wife craves. In the end what Hamlet wants is revenge, and what Macbeth wants is to make his wife happy.