One night in October, an Army private named Danny Chen apparently angered his fellow soldiers by forgetting to turn off the water heater after taking a shower at his outpost in Afghanistan, his family said.

In the relatives’ account, the soldiers pulled Private Chen out of bed and dragged him across the floor; they forced him to crawl on the ground while they pelted him with rocks and taunted him with ethnic slurs. Finally, the family said, they ordered him to do pull-ups with a mouthful of water — while forbidding him from spitting it out.

It was the culmination of what the family called a campaign of hazing against Private Chen, 19, who was born in Chinatown in Manhattan, the son of Chinese immigrants. Hours later, he was found dead in a guard tower, from what a military statement on Wednesday called “an apparent self-inflicted gunshot wound” to the head.

On Wednesday, the American military announced that the Army had charged eight soldiers in Private Chen’s battalion in connection with the death.