In Act 1, Macbeth has been victorious in battle and word has reached Duncan about how valiantly he fought. Duncan congratulates Macbeth who then expresses his loyalty to Duncan, the king.
After Duncan names Malcolm as the next king, something which Macbeth verbally praises but secretly curses, Duncan declares he will go to Inverness (Macbeth's castle) to celebrate Macbeth's bravery and new title. The object of the meeting is also to become better acquainted, so that Duncan and his family can "bind" themselves to Macbeth in the bonds of trusted friendship.
Duncan wants to show his gratitude, which he communicates to Lady Macbeth upon his arrival:
Give me your hand;
Conduct me to mine host. We love him highly,
And shall continue our graces towards him.
By your leave, hostess. (I.vi.34-37)
He is a thoughtful king which is why he takes the time to go to Inverness to thank Macbeth again. Loyal servants would be happy to host the king. This establishes two foil characters: Duncan as an innocent, generous king and Macbeth in his descent to becoming a calculating murderer.
Immediately after Duncan declares his older son, Malcolm, his heir, he turns to Macbeth and says, "From hence to Inverness, / And bind us further to you" (1.4.43-44). In other words, he and his retinue will leave now to go to Macbeth's home, and so Duncan will be indebted to Macbeth not only for Macbeth's incredible loyalty and bravery on the battlefield but also for the hospitality he will receive at Macbeth's household. It would have been considered a great honor for the king to visit one's house, and Duncan, as we know, very much wants to honor Macbeth for his bravery and fealty. Duncan has just awarded him another title, the Thane of Cawdor, and sends a message to others about Macbeth's importance to the king (he now has two such titles). Therefore, it is likely that Duncan visits Macbeth out of thanks, as well as to honor the man who so bravely defended Scotland against two enemies: a rebel Scotsman and a foreign invader.
Duncan was very greatful to macbeth for saving scotland. he had battled ferocously and won victory for scotland. duncan and macbeth were relatives also. so he thought it was his duty to honour macbeth by visiting his castle.