"The youths, aged 16 and 17, were detained by Customs yesterday, after they aroused the suspicions of two Customs and Border Protection officers," Immigration Minister Peter Dutton said.
The two who are said to be brothers were subsequently unarrested and released into their parents custody and were issued court attendance notices.
Their luggage contained extremist paraphernalia and a letter on how to fabricate a cover story to authorities when leaving the country, ABC news reported.
In response to the incident, Dutton said the teens were "kids, not killers".
Also Read
The boys were stopped on their way to a potentially very dangerous situation, and their parents were "shocked" to learn of their plans, Dutton said.
"These two young men, are kids, not killers," he said.
They shouldn't be allowed to go to a foreign land to fight and to come back to our shores eventually more radicalised, he added.
Australian Prime Minister Tony Abbott thanked the border protection officers and said the boys had been prevented from doing something "very dangerous".
"We know that there are other people who might be tempted to do silly things, and these are two youngsters who ... suddenly got it into their head to go and do something that is very dangerous for them and potentially very dangerous for others," Abbott said.
"We don't want is people coming into this country with evil intentions, and we don't want people leaving this country with evil intentions," he said.