Police moved in when 27-year-old Jose Pimentel of Manhattan reportedly acquired what he needed to actually build a bomb.
Mayor Michael Bloomberg announced the arrest at a news conference Sunday, saying Pimentel was motivated by terrorist propaganda and resentment of U.S. troops in Afghanistan and Iraq.
Bloomberg said Pimentel "was plotting to bomb police patrol cars and also postal facilities, as well as targeted members of our armed forces returning from abroad."
Authorities have no evidence that Pimentel was working with anyone else, the mayor said.
"He appears to be a total lone wolf," the mayor said. "He was not part of a larger conspiracy emanating from abroad."
Bloomberg said there have been at least 13 other lone wolf terrorist attempts in New York City.
Pimentel was arraigned Sunday night in Manhattan.
"Our office today filed charges against Jose Pimentel of Manhattan for conspiring to build a bomb for terrorist purposes and for possessing a weapon - a pipe bomb - that he is alleged to have intended to use to wage his campaign of violence," Manhattan district attorney. Cyrus R. Vance, Jr. said.
Authorities have been tracking Pimentel for two years. He used al Qaeda-inspired instructions on bomb making, particularly an article called "How to make a bomb in the kitchen of your mom."
Officials constructed a duplicate of the explosive device Pimental built and showed a video of how he intended to use it.
"We think that an event that really set him off was the elimination of Anwar al-Awlaki that happened on Sept. 30 of this year," said New York Police Commissioner Ray Kelly.
The Associated Press contributed to this report.