When Vrishnis slaughtered each other and Dwarka submerged in the ocean, Arjuna went to Vyasa's asylum. He was sad. Vyasa told him that it is high time to leave this material world.
Mahabharata 16.8
By thee also, O foremost of men, with Bhima for thy helpmate and the twins, O mighty-armed hero, has the great work of the gods been accomplished. O foremost one of Kuru's race, I regard thee and thy brothers as crowned with success, for ye have accomplished the great purpose of your lives. The time has come for your departure from the world.
Following Vyasa's instruction, Pandavas left Hastinapur and visited a few tirthas and eventually went to heaven.
Mahabharata 17.1
Ascertaining the resolution of Arjuna, Bhimasena and the twins fully endorsed the words that Arjuna had said. Resolved to retire from the world for earning merit, they brought Yuyutsu before them.
"'The five brothers, with Draupadi forming the sixth, and a dog forming the seventh, set out on their journey. Indeed, even thus did king Yudhishthira depart, himself the head of a party of seven, from the city named after the elephant. The citizens and the ladies of the royal household followed them for some distance.
However, what happened to Vyasa? When did he die?