A Manhattan nanny was taken into custody Thursday night after she was discovered near the bodies of two of her young charges, who had been fatally stabbed in their apartment in a luxury building on the Upper West Side, police said.

The children, identified by a law-enforcement official as 2-year-old Leo Krim and his 6-year-old sister, Lucia, were found by their mother after she returned home about 5:30 p.m. They were both taken to St. Luke's Hospital, where they were declared...