Sgt. Alonzo Lunsford was among 32 wounded in the spree; 13 were killed.
Lunsford testified on the second day of the Article 32 hearing and identified the suspect, Army psychiatrist Maj. Nidal Hasan, in the courtroom, CNN reported.
Lunsford said Hasan pulled a weapon from underneath his uniform and began to fire. The witness said, "I noticed the weapon he was firing had an infrared sight, like a laser sight on the weapon. He was aiming at the soldiers."
Lunsford said he had tried to escape, CNN reported, but then his eyes locked with Hasan's. "He discharged his weapon. ... I got shot in the head," the witness said.
The Article 32 hearing takes the place of a civilian evidentiary hearing, and is designed to determine whether there is enough evidence for a court-martial.
CNN said investigators from various branches of the government are looking into what was known of Hasan before last year, including whether he had contact with Islamic radicals overseas and how he was transferred from Walter Reed Army Medical Center in Washington to Fort Hood.
More than 100 witnesses have been called to testify at the hearing, including the 31 other people wounded in the attack and the two Fort Hood police officers who shot Hasan four times, CNN said.
Hasan is now paralyzed from the chest down.
Justin Bieber crashes Drake Bell's album release party
Putin thinks Obama would save him if he were drowning