They were arrested after buying a missile and C-4 plastic explosives in a sting operation run by the FBI and other agencies.
"This latest attempt to attack our freedoms shows that the homeland security threats against New York City are sadly all too real"
Michael Bloomberg, New York City mayor
Al Jazeera's John Terrett, reporting from New York, said the alleged plot failed because the FBI had been monitoring the men and an informant sold them dud weapons, making sure the explosives were inert and the missiles inactive.
Lev Dassin, the acting US attorney for the Southern District of New York, said in the statement that the suspects wanted "to engage in terrorist attacks".
"They selected targets and sought the weapons necessary to carry out their plans."
The authorities said Wednesday's arrests were the culmination of an investigation that began in June 2008, our correspondent said.
He added that the office of Peter King, a US congressman, said the four men are Muslim, although Al Jazeera was not able to verify that.
According to the authorities, Cromitie, also known as Abdul Rahman, told an FBI informant at a meeting in Newburgh in June 2008 that he was angry over the US-led war in Afghanistan and "expressed an interest in 'doing something to America'".
Cromitie told the informant that his parents had lived in Afghanistan and that he was upset about the number of Muslims being killed in the war there and in Pakistan by US forces, prosecutors said.
The suspect also told the informant last July that he wanted to join Jaish-e-Mohammed, a Pakistan-based group on the US list of "terrorist" organisations, to "do jihad", the statement said.
Four months later the informant began meeting regularly with Cromitie along with David Williams, also known as Daoud or simply DL; Onta Williams, also known as Hamza, and Laguerre Payen, also known as Amin and Almondo.
|A successful sting operation led to the arrests, officials said [NBC video grab]
In April the group agreed on the synagogue as a target and proceeded to conduct surveillance.
"Fortunately, the defendants sought the assistance of a witness co-operating with the government," Dassin said.
"While the weapons provided to the defendants were fake, the defendants thought they were absolutely real."
The men are expected to appear in the White Plains federal court later this week.
Each man is charged with one count of conspiracy to use weapons of mass destruction within the country and one count of conspiracy to acquire and use anti-aircraft missiles, offences which carry a maximum penalty of life in prison.
New York has remained on high alert for another attack since the September 11 attacks of 2001 that destroyed the World Trade Centre and killed nearly 3,000 people.
"While the bombs these terrorists attempted to plant tonight were - unbeknownst to them - fake, this latest attempt to attack our freedoms shows that the homeland security threats against New York City are sadly all too real," Michael Bloomberg, the New York mayor, said separately on Wednesday.