"When She Loved Me" is a song written by Randy Newman and recorded by Sarah McLachlan for Pixar's animated film Toy Story 2 (1999). It is sung from the perspective of the character Jessie, a toy cowgirl, who reflects on her past loving relationship with her original owner Emily, who eventually outgrew her. The song plays during a flashback montage that reveals Jessie's story of abandonment and loss, making it one of the most emotional and heartbreaking moments in the film. The song's lyrics express the feelings of love, companionship, and the sadness of being left behind, resonating with themes of unconditional love and growing apart. It has been widely acclaimed as a touching and tearful ballad, winning a Grammy and earning nominations for Golden Globe and Academy Awards.