The student, armed with a revolver, shot off two rounds that struck the ceiling inside a stairwell between the first and second floors of North Thurston High School in Lacey, about five miles east of the state capital of Olympia, said Lacey police commander Joe Upton.
A staff member at the school tackled the male student before more shots could be fired, Upton said.
Nobody was hurt in the incident, the latest in a growing list of school shootings that have sparked a national conversation about gun control and school safety.
Police have taken the boy into custody and the investigation was continuing, he said. The student gunman's age and grade were not yet known.
Police rushed to the building just as students were arriving for the day around 7:30 a.m., authorities said.
Panicked students fled the building after hearing the shots, local broadcaster KOMO reported.
"I heard a bang, but I thought it was a table that fell," student Elora Shields told the station. "And then we heard it again, and then everyone started running. So I ran outside with my friends."
Other students took to Twitter to commend the staff member, who they identified as a teacher, with tackling the gunman.
"I owe Mr. Olson my life. I think we all do. I wouldn't have had the courage to do that," student Joseph Delacruz said.
North Thurston Public Schools said classes were dismissed for the day and police were searching the building. Parents were being reunited with their children at the high school stadium, the district said in a statement on the website.
A nearby middle school was holding classes as usual, the statement said.
In October, a freshman student at a high school in Marysville, Washington, north of Seattle, used a handgun that belonged to his father to fatally shoot four classmates inside the school cafeteria before taking his own life.
Source: MSN News.