A construction crew working on a hillside in the 3200 block of Alexis Drive found the 3-by-12-inch shell at about 2:25 p.m., Palo Alto police said.
The crew evacuated the site and notified authorities.
The Santa Clara County bomb squad responded and detonated the device at about 5:35 p.m., police said.
The shell was old, unstable, and had been hit by construction equipment. It was therefore detonated in place, according to police.
No homes were evacuated as a result of the shell.