Paris prosecutor Francois Molins said French national Ziyed Ben Belgacem, 39, grabbed the soldier and put a gun to her head while seizing her assault rifle.
He told other soldiers: "Put your weapons down, hands on your heads. I'm here to die for Allah. In any case, people are going to die."
Then he tried to use the soldier as a shield, but she dropped to her knees to give two comrades a chance to shoot him.
Molins said Ben Belgacem fired at police in Garges-les-Gonesse earlier, slightly injuring one officer in the head.
His father and brother told investigators he contacted them after that incident, saying he had "done something stupid."
He also met a cousin in a bar the previous night.
Investigators released the father from questioning yesterday but held on to his brother and the cousin as they sought to build a profile of Ben Belgacem.
The three had made contact with the police.
Ben Belgacem, carrying a petrol and a Koran in a backpack, had various criminal convictions and was investigated for links to radical Islam.
France has faced a series of jihadist attacks that have claimed more than 230 lives since January 2015.