“Following discussions with Malala and her medical team, we decided that she would benefit from being at home with her parents and two brothers,” said Dr. Dave Rosser, the medical director.

Video released by Queen Elizabeth Hospital in Birmingham, England, showed Ms. Yousafzai walking slowly out of a ward, wearing a head scarf and accompanied by a nurse.

The release was a promising turn for the teenage activist. Her shooting brought global condemnation of the Pakistani Taliban, whose fighters killed six female aid workers this week in the same region in northwestern Pakistan where Ms. Yousafzai was shot.

On Oct. 9, gunmen halted her school bus as it went through Mingora, the main town in the Swat Valley, singled her out and opened fire. A bullet grazed her brain, nearly killing her, and traveled through her head before lodging in her neck.

Six days later, after emergency treatment in Pakistan, she was airlifted to the hospital in Birmingham, which specializes in treating British soldiers wounded in action in Afghanistan.

Medical experts say Ms. Yousafzai has a good chance of making a full recovery because of her youth, but the long-term impact of her head injuries remains unclear.