The movie makes it very clear that Dug is elderly at the start of the film, and he passes away peacefully in his sleep while Carl and Russell are on their adventure. It is a poignant and emotional moment in the film.