The 35-year-old actress performed "I Want It That Way" with the boy band after the Backstreet Boys made a surprise appearance on the show.
Blunt, who stars in the Mary Poppins sequel Mary Poppins Returns, told host Ellen DeGeneres she has a fear of singing in public.
"I think it's still not a natural thing for me. I find it very nerve-wracking to sing in front of people," she explained.
Blunt will sing in Mary Poppins Returns, which opens in theaters Dec. 19. She told DeGeneres she was "completely shocked and slightly terrified" when director Rob Marshall approached her about the title role.
"It's such an iconic character. You realize how much she's made such an imprint on people, and the first movie is so beloved," the star explained.
Mary Poppins Returns is set 30 years after the original 1964 film, which starred Julie Andrews in the title role. The new movie features original star Dick Van Dyke and co-stars Lin-Manuel Miranda, Ben Whishaw and Emily Mortimer.