The eighth-grade student, who has not been identified by authorities, was in critical condition early Tuesday after undergoing surgery following Monday's shooting. No one else was injured.
Afterward, investigators found a profanity-laced note that said "U all will die."
"The letter indicated his intention was to kill people," Lafourche Parish Sheriff Craig Webre said.
The student left during homeroom Monday morning, a fellow student said. He went to the bathroom and changed from the khaki uniform pants the school requires to a pair of camouflaged pants. He then stormed into the classroom across the hall from the restroom - gun in hand, said Coley Gaspard, 14, who was in the room.
Investigators believe the boy chose the room because of its closeness to the restroom, not because he had any agenda concerning the teacher or students.
He tried to shoot the teacher, Webre said, but the gun did not fire.
Webre said the boy made an adjustment, then fired over the teacher's head. As he left the room he asked one of the students to go with him, but left alone when the youngster remained seated.
He apparently returned to the bathroom and shot himself within minutes, Webre said.
The young man got the gun, a .25-caliber, nickel-plated semiautomatic, from his father's house during the weekend, Webre said.
The school has both standing and handheld metal detectors, but they aren't used all the time and weren't in use Monday. The school was scheduled to reopen Tuesday with enhanced security and several counselors on hand.
At another school about 100 miles away, deputies found an unloaded handgun in the backpack of a 15-year-old boy Monday.
Authorities in East Baton Rouge told The Advocate newspaper that a teacher at a private school for grades 4 through 12 reported suspicions that the student had a weapon. The student, who was not named, was taken into juvenile detention on a count of carrying a weapon on school property.
The Larose school, with about 500 sixth-, seventh- and eighth-graders, is in a rural community of about 7,000 people, some 45 miles southwest of New Orleans.
Webre said the boy had no disciplinary problems at school and hadn't been in trouble with the law. The student's parents told the Sheriff that the boy gave no indication of any problems, reports Moore.
"He makes reference to himself as an outcast," Webre said, referring to the journal. "But nothing in his record reflects that."
He was a year or two older than most of his classmates who described him as a quiet boy who never talked about guns or violence.
The boy's mother said he seemed nervous before leaving for school, but when she asked him about it, he attributed it to getting the results of the "LEAP" tests that eighth-graders must pass to be promoted.
Gaspard said he was in his seventh-grade English and reading class when the boy came in. The teen yelled for everyone to get down, cursing at the class.
Nobody moved. Gaspard knew the boy, whom he described as quiet and nice, and thought it was a dramatic enactment for some sort of lesson. Then, he said, the boy walked over and pointed the gun at the teacher, ordering her to say, "Hail Marilyn Manson," referring to the shock-rock icon, Gaspard said.
She said nothing. After firing into the wall, the youngster told another boy to get up. The seventh-grader stayed in his seat, and the teen left.
Webre said he couldn't confirm Gaspard's account.