CBS News quoted two law enforcement officials as saying the suspect was Muhammad Youssef Abdulazeez. No motive has yet been given. The suspected shooter, who has been officially identified, is believed to have lived in the area and acted alone, local police said.
The other four killed were Marines at a Naval Reserve Center, a military official said in Washington, DC.
"We are treating this as an act of domestic terrorism," said Bill Killian, the U.S. Attorney for the Eastern District of Tennessee, adding that no official determination of the nature of the crime had yet been made.
The suspect, seen driving in an open-top Mustang, is believed to have first gone to a joint military recruiting center in a strip mall, and peppered the facility with gunfire. No one was injured in the attack.
"Everybody was at a standstill and as soon as he pulled away everyone scrabbled trying to make sure everyone was OK," said Erica Wright, who works two doors down from the center.
The gunman then drove off to a Naval Reserve Center about 7 miles away, fatally shooting the four Marines before being fatally shot himself in a firefight with police.
Three others were wounded in the attacks, including a police officer and a Marine. The shootings began at about 10:45 a.m. local time and ended about 30 minutes later.
"There were numerous Chattanooga and Hamilton County officers who responded. They arrived on the scene extremely quickly. They actively and enthusiastically engaged this brazen criminal, and one of those officers was injured by gunfire from this criminal," Chattanooga Police Chief Fred Fletcher told a news conference.
A White House spokesman said President Barack Obama had been told about the shooting.
"The President has been briefed by his national security staff on the Chattanooga shooting, and will continue to get updates as warranted," said spokesman Eric Schultz.
Lockdowns had been put in place at businesses, a college and other facilities near the shooting sites.
The city along the Tennessee River is in the southeastern section of the state just north of the Georgia border. Just over 173,000 people live there, according to a 2013 estimate from the U.S. Census Bureau.