Alexander Ciccolo, who also goes by Ali Al Amriki, was charged with felony possession of firearms, the U.S. attorney's office in Massachusetts said.
His father, a Boston police captain, alerted authorities after Ciccolo made alarming comments, according to a law enforcement source. Robert Ciccolo has had minimal contact with his son since the younger Ciccolo turned 7, the source said.
"While we were saddened and disappointed to learn of our son's intentions, we are grateful that authorities were able to prevent any loss of life or harm to others," the family said in a statement, asking for privacy.
According to court documents, Alexander Ciccolo has a long history of mental illness and had become obsessed with Islam in the past 18 months.
On July 4, the 23-year-old accepted firearms that he had ordered from a person who was cooperating with members of the Western Massachusetts Joint Terrorism Task Force, prosecutor Carmen M. Ortiz said.
The men had been talking in recorded conversations about Ciccolo's plans to commit an act of terrorism, Ortiz's office said in a statement. Ciccolo allegedly said he was inspired by ISIS and wanted to set off homemade bombs such as pressure cookers filled with black powder, ball bearings and glass in places where a large number of people gather, including a college cafeteria.
Ciccolo explained that if a student was Muslim, then that student would be permitted to help, sit or leave, according to court documents. He allegedly said he would put some explosives on campus beforehand, and would plan the attack around lunchtime when the cafeteria is busy.
Ciccolo also identified a bar as a target, according to court documents. He purportedly picked it because it is crowded, and supportive of the recent U.S. Supreme Court decision allowing same-sex marriage
. He later dropped that idea.
One of the advantages of the school cafeteria, Ciccolo allegedly said, was that it is a favorable place to get out of, suggesting he was thinking about how to escape.
"We win or we die," Ciccolo is accused of saying.
According to the documents, he said he wanted to carry out the attack before Ramadan was over, and no later than July 31.
Before his arrest, agents watched Ciccolo purchase a pressure cooker similar to that used in the 2013 Boston Marathon bombings.
Ciccolo was arrested accepting the guns that included a Colt AR-15 .223-caliber rifle, a SigArms Model SG550-1, 556 caliber rifle, a Glock 17-9mm pistol and a Glock 20-10 mm pistol, the office said.
Investigators allegedly found several partially constructed Molotov cocktails in Ciccolo's apartment. They also found two machetes and a long curved knife.
A detention hearing is set for Tuesday afternoon in U.S. District Court in Springfield, Massachusetts.
After he was arrested, Ciccolo met with a nurse for routine medical screening. During their meeting, Ciccolo allegedly grabbed a pen and stabbed the nurse in the head, leaving a bloody hole in the nurse's skin and causing the pen to break in half.