The men, both Swedish citizens, were from the town of Örebro.
The Örebro Mosque and the Horn of Africa Association confirmed the news, telling Swedish Television that they heard from the men's families on Sunday.
According to Mahdi Warsama, president of the Horn of Africa Association, the two men travelled between Sweden and Iraq several times and the parents had tried to stop them because they were worried they would join IS.
The Swedish intelligence service, Säpo, says it is concerned about terrorist groups' recruitment of Swedish citizens. "This is a national and international problem," Fredrik Milder of Säpo said.
Säpo, says it cannot prevent people from travelling to Syria, but that it carefully monitors those who join terrorist groups.