The fact that Peter Pan's shadow can be detached from him is an indication that, as a boy who can never grow up, he is not attached to the earth like everyone else. A shadow is one of many signs that people belong upon this earth, that they are intimately connected with it. But the same cannot be said of Peter Pan, who doesn't have the kind of physical life on earth that most of us take for granted.
As a result, Peter is prone to losing his shadow. This is precisely what happens one night at the Darling residence when Mrs. Darling is frightened out of her wits by the sudden appearance of a strange-looking boy in her midst. Her screams alert Nana, the family dog, who immediately leaps into the breach and jumps at the boy.
Fortunately, Peter is able to escape from Nana by jumping through the window, but at the expense of leaving his shadow behind. When Nana chased Peter, she inadvertently shut the window through which he escaped, snapping off his shadow in the process.
When Mrs. Darling returns to the nursery, she sees Nana with Peter Pan's shadow in her mouth. Nana hangs the shadow out of the window so that when Peter comes back for it later, he won't disturb the children. Mrs. Darling, however, rolls the shadow up and places it in a drawer.