Lanza, carrying two handguns, committed suicide at the school, bringing the toll to 28, authorities said.
"Evil visited this community today and it's too early to speak of recovery, but each parent, each sibling, each member of the family has to understand that Connecticut - we're all in this together,"said Gov. Dannel Malloy.
The number of deaths at Sandy Hook was exceeded only by the Virginia Tech massacre that left 33 people dead in 2007.
"Our hearts are broken today," a tearful President Obama, struggling to maintain composure, said at the White House. He called for "meaningful action" to prevent such shootings. "As a country, we have been through this too many times," he said.
Youngsters and their parents described teachers locking doors and ordering the children to huddle in the corner or hide in closets when shots echoed through the building.
Authorities didn't say exactly how the shootings unfolded.
Adam Lanza's older brother, Ryan, 24, of Hoboken, N.J., was being questioned. He was misidentified as the shooter in some earlier media reports Friday.
The law-enforcement official who said Adam Lanza had a possible personality disorder said Ryan Lanza had been cooperative, was not believed to have had any involvement in the rampage and was not under arrest or in custody, but investigators were nonethless checking his computers and phone records. Ryan Lanza told authorities that he had not been in touch with his brother since about 2010.
The official spoke on the condition of anonymity because he was not authorized to speak on the record about the unfolding investigation.
Lanza drove to the school in his mother's car, a second unnamed law-enforcement official said. Three guns were found - a Glock and a Sig Sauer, both pistols, inside the school, and a .223-caliber rifle in the back of a car.
Obama's comments on the tragedy amounted to one of the most outwardly emotional moments of his presidency.
"The majority of those who died were children - beautiful, little kids between the ages of 5 and 10 years old," Obama said.
He paused for several seconds to keep his composure as he teared up and wiped an eye. Nearby, two aides cried and held hands as they listened to Obama.
"They had their entire lives ahead of them - birthdays, graduations, wedding, kids of their own," Obama continued about the victims. "Among the fallen were also teachers, men and women who devoted their lives to helping our children."