Armed with several weapons including a gun and a knife, the attacker opened fire as children were sleeping at the centre in the rural town of Uthai Sawan in Thailand's northeastern province of Nongbua Lamphu, one of the country's poorest regions.
As he fled the scene, the attacker drove into a crowd of people and shot bystanders, then returned home and shot his wife and child before turning the weapon on himself.
A former police officer, the suspect had been dismissed from the force after being caught with methamphetamines, officials say.
Investigators are looking into whether it was a drug-fuelled attack.
The massacre is among one of the world's deadliest child mass killings by one person.
Thai Prime Minister Prayuth Chan-Ocha was expected to visit the region on Friday.
In a statement on Facebook, he called Thursday's rampage a "shocking incident".
For Australians looking for intelligent and unbiased news coverage, join renowned journalist Natarsha Belling on Your Morning Agenda for breaking national and international stories as well as the top business and finance stories - every weekday from 6:30am on Listnr