The 20-year-old, named as Yamen A., was in the process of acquiring the chemical products and materials necessary to build a bomb when he was arrested in the northeastern town of Schwerin in October 2017.
At the time, Interior Minister Thomas de Maiziere said “a serious attack has been prevented”.
According to prosecutors, Yamen A. planned to kill or injure about “200 people” with a car bomb at an undisclosed location in Germany.
He discussed bomb-making instructions in online chat groups and repeatedly tried to manufacture the powerful explosive TATP, his trial at Hamburg's higher regional court revealed.
Prosecutors had sought a punishment of five and a half years, but judges opted for a longer sentence given the accused's “determination” to carry out an attack, DPA news agency reported.
“You wanted to take lives, and in doing so endanger the security of the state,” said presiding judge Ulrike Taeubner.
Yamen A. arrived in Germany in 2015 at the height of the refugee influx to avoid military service at home.
Investigators believe he was radicalized over the Internet by mid-2017 and became a supporter of the Islamic State group.
Germany remains on high alert over the risk of a jihadist attack, having suffered several in recent years.
The bloodiest, claimed by IS, was a truck rampage through a Berlin Christmas market in December 2016 that left 12 people dead.