The attacker, who is named in the footage as Muhammad Riyad, was gunned down by armed police after fleeing the scene near the city of Wurzburg, 70 miles north of Nuremberg last night.
He is believed to be 17 years old although in the video, it appears he could be much older.
It has been revealed he moved to Germany two years ago and had been living with a foster family in Ochsenfurt for the past two weeks.
He shouted 'Allahu Akbar' during the incident and ISIS has claimed responsibility, making it the first attack by the terror group in Germany.
As many as 19 passengers needed hospital treatment while three victims are fighting for their lives after being attacked with 'cutting and stabbing weapons'.
An eyewitness said the train, which had been carrying around 25 people, looked 'like a slaughterhouse' after the rampage, with blood covering the floor.
In the video released by ISIS and filmed before the stabbing, the teenager says he will carry out the attack and threatens 'infidel' countries.
Knife in hand, he then announces in Pashto, an Afghan language, he would carry out an 'operation' in Germany, and presents himself as a 'soldier of the caliphate'.
He says: 'I am one of the soldiers of the Islamic Caliphate, and I am going to conduct an attack in Germany. It is about time to stop you from coming to our homes, killing our families, and getting away with it.
'Our apostate politicians have never tried to stop you, and Muslims have never been able to fight you back or even speak against what you do. But these times are gone now.
'With the Islamic Caliphate now instated in Iraq, Sham, Khorasan, Libya and Yemen, its soldiers will be able to attack and slaughter you in your homelands, and they will take your nations as homes and military bases for them.
'Know this, that the Islamic State is powerful and has your parliaments in its sights.
I would advise you not to forget the spectacular attacks in France. I will fight you so long as I live and I will slaughter you with this knife and I will cut through your throats with this axe.'
Police have now recovered the axe the teenager used in his assault and removed his body from a field, where it had been left since he was shot dead last night.
However, officers have yet to confirm if he is indeed called Muhammad Riyad. But they did say the attacker had learned over the weekend that a friend had been killed in Afghanistan.
German authorities said they had found a hand-painted ISIS flag and what they called a suicide letter among the asylum seeker's belongings.
The flag and the note are believed to have been discovered in the house he was living in with a foster family.
There were also books in English and German about Islam found in his room and a written farewell to his father among his possessions.
It said: 'Pray for me that I can take revenge on these infidels and pray for me that I will go to heaven.'
He had been placed with a couple just two weeks ago after living for nearly two years in a hostel run by the Catholic Kolpingwerk charity.
Bavarian interior minister Joachim Hermann said that the teenager came to Germany as an unaccompanied minor, and applied for asylum in March.
He lived in a home for teenage refugees until he was placed with the foster family, Daily Mail reported.
219