Federal Judge Brian Cogan, who is handling the trial set to begin in September, granted the US attorney's office's request for anonymity.
Guzman, 60, is accused of running the Sinaloa crime syndicate, one of the world's biggest drug empires. He has twice escaped prison in Mexico and has been held in solitary confinement in New York since being extradited to the United States a year ago.
The US district attorney for the eastern district of New York, based in Brooklyn, has presented "strong and credible reasons to believe that the jury needs protection," Cogan wrote.
Based on the indictment, "it seems likely that the trial evidence will depict a pattern by the defendant and his associates such as would cause a juror to reasonably fear for his own safety."
More From This Section
Cogan said there appeared to be be some "dangerous individuals, apparently not under (Guzman's) control, who have expressed a desire to assist him."
Prosecutors cited a group of prisoners in California who, just after Guzman was extradited to the United States in January 2017, posted a video vowing to support the defendant.
Guzman is facing 17 charges related to drug trafficking and, if convicted, he would likely to spend the rest of his life in a maximum security US prison.