Afghan-born Ahmad Khan Rahimi, 30, was convicted at trial last October on eight counts linked to two bombs he planted in New York, and others found in New Jersey.
"There is nothing that could justify anything but a life sentence," US District Judge Richard Berman told the court.
"There is no comparison between the grievances that you may feel and the actions you took," he said. "The conclusion is inescapable that you remain extremely dangerous."
At Rahimi's two-week trial, prosecutors said it was a "miracle" that nobody was killed in the September 17, 2016 attack.
A second bomb forced the cancellation of a US Marine Corps run in the New Jersey town of Seaside Park.
Police also defused another device in Chelsea and found additional pipe bombs in Rahimi's hometown of Elizabeth, New Jersey, where he worked in his family's fried chicken restaurant.
Rahimi was critically wounded in a shootout with police on September 19 before being captured, and was found with a handwritten journal lauding Osama bin Laden and US-born Al-Qaeda recruiter Anwar al-Awlaki.
Since his arrest, two other lone-wolf attackers have carried out bombings in New York. A Bangladeshi driver detonated a bomb in a subway passageway, wounding himself and three other people in December.
On October 31, an Uzbek immigrant, also reportedly inspired by the Islamic State extremist group, killed eight people on a bike path by ramming his truck into cyclists.