Dozens of people were also hurt in the blaze while the guard, who was reported to be mentally ill, died after succumbing to his own burn injuries.
The tragedy occurred in a modest quarter of Janauba, a city of 70,000 about 600 kilometers (370 miles) north of Belo Horizonte city.
Janauba's mayor decreed seven days of mourning.
"This morning, four children and a teacher burned to death when a guard at the nursery school sprayed alcohol on the victims and his own body before setting them alight," the prosecutor of Minas Gerais state, in the country's southeast, said in a statement.
About 50 people were hospitalized with injuries, said Bruno Ataide Santos, director of the local hospital.
Their condition was not known.
The guard, aged about 50, died in hospital several hours after the incident which left him "with burns all over his body," Santos told AFP.
About 80 children were in the nursery school when the attack occurred, prompting worried parents to converge on the site which they found reduced to ashes.
"As the creche is near our house we heard noise and rushed over," Nelson de Jesus Silva, the father of one victim, told Globonews TV.
"My little girl was so good, so smart," he said of his dead daughter Ana Clara Ferreira.
Grief also struck Jane Kelly, the mother of little Juan Miguel Soares.
"I was thinking of changing nursery schools because we are preparing to move. I woke him up early to bring him here and when I saw him again he was dead in the hospital," Kelly said between sobs.
Police visited the home of the suspect and his family members to try to determine a motive.
But police superintendent Renato Nunes told the website of the Hoje em Dia newspaper that the guard had "mental problems" since 2014.
Officers found numerous bottles of alcohol at his home, Nunes added.
The guard had worked for at least eight years at the nursery school where he was not directly in contact with the children.
Janauba's mayor Carlos Isaildon Mendes said an even greater tragedy was narrowly averted.
"This could have been worse because the babies' room was in the hall next door. Evacuation would have been more difficult. As the children were bigger a lot of them were able to escape," the mayor explained.
Brazil's President Michel Temer expressed his condolences via Twitter.
"I am deeply saddened by this tragedy involving children in Janauba, and I want to express my solidarity with the families," Temer wrote.
As the father of a school-age child, Temer said he understood "this must be an
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.