The gun was found on the ground in front of the school, located at 150 E St., at about 9 a.m., Martinez Unified School District Assistant Superintendent Rick Rubino said.
"When you find a handgun case without the handgun on a school campus, it could be a serious matter," Rubino said.
School officials called Martinez police, and police sent 11 officers to the campus, he said.
The campus was put on lockdown at about 10:20 a.m. as police and school personnel went from classroom to classroom searching backpacks and other belongings, Rubino said. Lockers were also searched.
The search concluded at about 12:30 p.m. and the lockdown was lifted, he said.
"We've determined that there is no weapon on campus and the kids are safe," he said.
He said parents had been notified of the situation through email and an automated phone notification system. The school also posted updates on its website.
"As always, our number-one priority is the safety of our students," Rubino said.
Classes have resumed, and school is scheduled to let out today shortly after 2 p.m.