He was 17 when he came to New York from Hong Kong in 1992 with his parents and younger sister, eyeing the skyline like any newcomer. Fifteen years later, Hiu Lui Ng was a New Yorker: a computer engineer with a job in the Empire State Building, a house in Queens, a wife who is a United States citizen and two American-born sons.

But when Mr. Ng, who had overstayed a visa years earlier, went to immigration headquarters in Manhattan last summer for his final interview for a green card, he was swept into immigration detention and shuttled through jails and detention centers in three New England states.

In April, Mr. Ng began complaining of excruciating back pain. By mid-July, he could no longer walk or stand. And last Wednesday, two days after his 34th birthday, he died in the custody of Immigration and Customs Enforcement in a Rhode Island hospital, his spine fractured and his body riddled with cancer that had gone undiagnosed and untreated for months.

On Tuesday, with an autopsy by the Rhode Island medical examiner under way, his lawyers demanded a criminal investigation in a letter to federal and state prosecutors in Rhode Island, Connecticut, Massachusetts and Vermont, and the Department of Homeland Security, which runs the detention system.