Three of the victims were pupils aged nine or under at Covenant School, a privately run Christian school.
They were named by police as Evelyn Dieckhaus, Hallie Scruggs and William Kinney.
The adults victims were employees and named as Cynthia Peak, 61, Katherine Koonce, 60, and Mike Hill, 61.
Covenant School has about 200 students, and teaches pupils from three years old up to around 12.
Ms Peak was a substitute teacher working at the school that day. Mr Hill was a janitor and Ms Koonce is described as the Head of School on Covenant's website.
Police named the suspect as a 28-year-old woman, Audrey Hale, who identified as transgender.
Hale was armed with three guns, including a semi-automatic rifle, and was shot dead by police.
Nashville Police Chief John Drake said the shooter had conducted surveillance, and that maps of the building showing entry and exit points were found at a nearby home.
Police received the first call about the incident at 10:13 local time on Monday morning.
Police said the suspect got in by firing through one of the school doors, which were all locked.
Hale fired shots on the ground floor before moving to the building's second floor, and was shot dead in a confrontation with police at 10:27. One officer was injured by broken glass during the operation.
A search of a nearby parked car had led officers to "firmly believe" that Hale was a former student of the school.
Police have spoken with the attacker's father during a search of a nearby home that is listed as the shooter's address.
Chief Drake said investigators there found a manifesto and "a map of how all of this was going to play out".
In the hours that followed the shooting, parents gathered at a nearby church to be reunited with their children. As buses of children arrived, they hung their heads and hands out of the windows to wave to their parents, according to the Tennessean newspaper.
The Presbyterian-affiliated Covenant School is located in the upscale Green Hills neighborhood, just south of downtown Nashville.
The mother of one pupil at the school said her son had been left traumatised by the shooting.
"I think he's doing better now that he knows that the shooter is dead," Shaundelle Brooks told BBC News.
"These are conversations we shouldn't be having," she added. "We're failing our children."
In a statement, Nashville Mayor John Cooper said the city had "joined the dreaded, long list of communities to experience a school shooting".
"My heart goes out to the families of the victims," Mr Cooper added. "Our entire city stands with you."
President Joe Biden called the shooting a "family's worst nightmare".
"We have to do more to stop gun violence," he said, calling on Congress to pass gun control laws. "It is ripping at our communities apart, and ripping at the very soul of this nation."
The attack was America's 129th mass shooting of 2023, according to Gun Violence Archive, a non-profit that tracks gun violence data.
According to data compiled by Education Week, there have been 12 school shootings that have resulted in deaths or injuries in the US this year up until the end of last week.
The school teaches pupils from pre-school up until about 12 years old