John Luebbers, 44, was arrested at his home Wednesday after Sam LaCara, 50, was shot at Louisiana Schnell Elementary School in Placerville.
No children were injured in the shooting, but police said one child might have seen the attack in the school office.
Placerville Union School District Superintendent Nancy Lynch said LaCara had only sent Luebbers home for the day after the janitor became upset over a personnel matter.
Lynch said LaCara did not fire Luebbers, because final employment decisions are made by the local education board with her input. She added that the two men "had a good relationship."
When asked if Luebbers misunderstood his employment status, Lynch said: "That may have been it."
"He was upset about a disagreement," Lynch said. "Mr. LaCara thought he needed to go home and cool off for the day."
Vicki Barber, superintendent of the El Dorado County Office of Education, said the two men apparently had a dispute about the district's selection of a new nighttime custodian. Luebbers was the daytime custodian and supervised that employee.
"There was a disagreement as to who should be selected," Barber said.
Luebbers' mother, MaryAnn Phillips, said her son was friends with LaCara, and the two had gone golfing Sunday.
She declined further comment to The Associated Press, but told The Sacramento Bee, "I really can't begin to imagine why he did it or how he did it." She also told the newspaper her son had worked at the school for more than eight years.
The school district closed all three of its schools Thursday. It planned to reopen schools Friday and make counselors available to students.
Luebbers was expected to be arraigned Friday. El Dorado County prosecutors declined to specify any charges until then.
A candlelight vigil was held Wednesday night to mourn LaCara, a married father of three daughters who worked his way up from a gym teacher more than 20 years ago to principal in 2003.
"He's like a father to all the kids in school," Patrick Fountain told the newspaper. He said his 10-year-old daughter, Donna Zessin-Fountain, attends the school.
The shooting prompted a lockdown of the 400-student campus about 50 miles east of Sacramento. Students were taken to the county fairground, where they were released to their parents.