Both men apologized in federal court, saying they became misguided after the U.S.-led invasion overseas.
"I was caught up with the fervor of world events," said Zubair Ahmed. "At that time, I was looking at U.S. troops as my enemy."
U.S. District Judge James Carr sentenced Ahmed, of suburban North Chicago, to 10 years, and his cousin, Khaleel Ahmed, of Chicago, to eight years, four months.
Both pleaded guilty in January 2009 to conspiracy to provide material support to terrorists.
Prosecutors said that the men were in their early 20s when they traveled to Egypt in 2004 with plans to kill U.S. troops, but that they were stopped and returned to the U.S. by Zubair Ahmed's father, who had found out about their plans. Investigators said the cousins wanted to go to Pakistan but did not have a concrete plan.
After returning home, they became involved with three men from the Toledo area who were convicted in 2008 of recruiting terrorists and raising money to fund their plans to wage a holy war against U.S. troops.
The Ahmed cousins also met met with an FBI informant and talked about learning to shoot machine guns and sniper rifles.
Assistant U.S. attorney Justin Herdman said the pair had a five-year plan to train for a violent jihad, or holy war.
He said they also had connections with an Atlanta man who is now in prison for plotting to aid terrorists by sending homemade videos of Washington landmarks overseas.
Zubair Ahmed had several conversations with Syed Haris Ahmed, who was sentenced last December to 13 years in prison on a charge of conspiring to support terrorist groups, Herdman said.
Attorneys for both Zubair and Khaleel Ahmed were not actively planning or training to kill American soldiers overseas.
"They were naive," said attorney Terry Gilbert. "Beyond that trip to Egypt, nothing ever really materialized."
But the judge noted that both men also met the informant and discussed shooting weapons.
"You can think what you want about this country," Carr said. "But uou can't follow up and take action."
The two men were arrested in February, months after the three men in Ohio were accused of plotting attacks.
Prosecutors said that Marwan El-Hindi, of Toledo, recruited the cousins in 2004 to join his cell there and that they all met at a Muslim convention in Cleveland with a former U.S. military man who worked undercover and helped foil the plot.
During the trial of the three Ohio men, the military veteran who secretly taped conversations with the men testified that they talked several times about the two from Chicago. According to the recordings, El-Hindi said the two cousins were eager to receive "jihad training."
But he also said that the two were naive and that they should not go anywhere because they thought shooting guns was like playing a video game.
"They are like kids," El-Hindi said. "They're like a piece of clay."
Zubair Ahmed, born in Chicago, said that six years ago he couldn't reconcile being both a Muslim and U.S. citizen.
The Indian-board Khaleel Ahmed, who is a naturalized U.S. citizen, told the judge that he isn't a violent person and that he has changed.
Zubair Ahmed received a harsher sentence because he was more actively involved in the planning and because of his frequent contact with Syed Haris Ahmed, Carr said. Neither of the cousins is related to the Atlanta man.