All of the victims were military, according to officials. At least three victims were listed in critical condition.
The gunman was identified as 34-year-old Army Specialist Ivan Lopez. Sources tell ABC News he was a truck driver.
In a Wednesday night news conference at the base, Lt. General Mark Milley said the shooter had served four months of combat duty in Iraq in 2011. Milley said Lopez was undergoing psychiatric evaluation for anxiety and depression. He had arrived at Fort Hood in February.
Milley said that the exact sequence of events still was not totally clear, but said that after the gunman opened fire, military "respondents" engaged the shooter within 15 minutes.
The shooter apparently walked into a building and began firing a .45-caliber semi-automatic pistol that had been purchased recently. He then got into a vehicle and continued firing before entering another building and kept shooting.
Milley said Lopez was met by a military police officer in a parking lot on the base. The shooter held his hands up, then reached for his gun. The female officer "engaged the shooter," at which point Lopez fatally shot himself.
Law enforcement sources tell ABC News the firearm used by the assailant was a Smith & Wesson .45-caliber semi-automatic handgun. ATF is conducting an urgent trace of the gun, which is standard protocol in these types of incidents. The gun was reportedly purchased in the area of Fort Hood.
A motive for the shooting was not immediately determined. A federal law enforcement source tells ABC News at this point there is no information pointing to terrorism.
Defense Department, FBI and local law enforcement officials earlier confirmed there was an active shooter on the base. The shooting began at about 4 p.m. local time. The entire incident lasted approximately 15 to 20 minutes.
Law enforcement worked to clear the scene of any other potential threats; then the all-clear sirens went off just before 7 p.m. and the lockdown was lifted hours after the shooting.
Killeen Police Department personnel, FBI and ATF agents responded to the incident. Bell County Sheriff's Office Lt. Donnie Adams said the sheriff's office dispatched deputies and troopers from the Texas Department of Public Safety to the nearby post.
The 1st Calvary Division, which is based at Fort Hood, sent a Twitter alert telling people on base to close doors and stay away from windows. All students and personnel at nearby Central Texas College were ordered to evacuate the central campus.
President Barack Obama was informed of the shooting, a White House spokesperson said.
"We're heartbroken something like this might have happened again," Mr. Obama said. "The folks there have sacrificed so much on behalf of our freedom. Many of the people there have been on multiple tours of Iraq and Afghanistan, they served with valor, they served with distinction. At their home base they need to feel safe."
The base was the scene of a mass shooting in 2009. Thirteen people were killed and more than 30 wounded. Army psychiatrist Nidal Hasan was convicted and sentenced to death last year in the Nov. 5, 2009, attack on his fellow soldiers as they waited inside a crowded building at Fort Hood. Soldiers there were waiting to get vaccines and routine paperwork after recently returning from deployments or while preparing to go to Afghanistan and Iraq.
After that shooting, the military tightened security at bases nationwide. Those measures included issuing security personnel long-barreled weapons, adding an insider-attack scenario to their training, and strengthening ties to local law enforcement, according to Peter Daly, a vice admiral who retired from the Navy in 2011. The military also joined an FBI intelligence-sharing program aimed at identifying terror threats.
ABC News and The Associated Press contributed to this report.