State Rep. Dewayne Bunch, 49, was punched in the head and fell to the cafeteria floor, hitting his head on the tile, Whitley County Sheriff Colan Harrell said.
"He ran over there very quickly and ran right into the punch," Harrell said. "... When his head hit the floor, he sustained more injury."
Bunch was in "extremely critical" condition at a local hospital before being taken to the University of Kentucky Medical Center in Lexington. A spokeswoman there said Bunch's family had requested no information be released about his condition.
The two boys involved in the fight, ages 15 and 16, were charged with one count of first-degree assault and two counts of third-degree assault, and have been taken to a juvenile detention center, the sheriff said.
A surveillance camera caught most of the fight and showed Bunch being hit by the 16-year-old, the sheriff said. It wasn't clear what sparked the fight, which began as breakfast was being served to dozens of students at the school in Williamsburg.
The boys kept fighting after Bunch was knocked out, the sheriff said. Two other teachers were also struck, but were able to stop the fight. Neither the students nor the other two teachers needed medical attention.
Bunch's family said in a statement they appreciated an overwhelming show of concern and support and asked the media to respect its privacy while dealing with a difficult situation.
"We ask that you continue to keep Dewayne in your thoughts and prayers during the hours and days to come," the family said.
Bunch, a Republican, was elected last fall after defeating longtime legislator Charles Siler, a Republican, in the spring primary. Bunch represents Whitley County and part of Laurel County in the southeastern part of the state. He has taught math and science at Whitley County High for 17 years.
County schools held a moment of silence for Bunch.
"Our entire school district family remains in prayer for Dewayne and his family," said Whitley County school Superintendent Scott Paul.
The House adjourned March 24. Bunch took leave on the days the House was in session, a school district spokesman said.
Kentucky House Speaker Greg Stumbo called it a sad day.
"I hope he will be able to recover from this horrific situation," the Democrat said in a statement. "I enjoyed working with Dewayne when the General Assembly was in session and found him to be an excellent advocate for his constituents."
On his Facebook page, Bunch gushed about his new role as a state lawmaker. He said he aspired to be "part of a new generation of politicians," with a focus on accountability and service. "I intend to work hard to make a difference in our state and district," he wrote.
Bunch spent more than 20 years in the Kentucky National Guard. His House bio said he served in Iraq as a first sergeant and earned numerous honors, including the Bronze Star.
Bunch is a member of the House Education, Labor and Industry and Veterans, Military Affairs and Public Protection committees.
Associated Press writers Dylan Lovan and Beth Campbell in Louisville contributed to this report.