The US attorney's office identified the suspect in custody as David Wright and said he would appear in a federal court today.
Wright was arrested overnight after police and the FBI shot dead a 26-year-old terror suspect who allegedly closed in on officers while brandishing a military-style knife outside a pharmacy yesterday.
The Boston Globe newspaper reported that the two men had conspired to kill a police officer, citing two law enforcement officials.
The New York Times said Usaama Rahim, who was shot dead by police and the FBI yesterday, had been planning to behead a police officer.
More From This Section
The Times said the shooting was an "unexpected episode" in a larger terrorism investigation, with links to several people, and that Rahim had been radicalized by militant Islam on social media.
"We believed he was a threat," Boston Police Commissioner William Evans told reporters yesterday. Rahim had been wanted for "terrorist-related information," he said.
"Their lives were in danger when two officers discharged their weapons," Evans said, showing reporters a photograph of the black knife that he said the suspect brandished.
Rahim's brother, imam and Islamic educator Ibrahim Rahim, said his younger brother was shot three times in the back by police as he waited for the bus to go to work.
"Once we have had an opportunity to grieve, we will make a family statement," he wrote on his Twitter account.
The older brother graduated from university in Medina, Saudi Arabia
The special agent in charge of the FBI in Boston, Vincent Lisi, said Rahim had been under 24-hour surveillance. "We considered him armed and dangerous," he told reporters.