The sheriff’s deputy who was assigned to the Florida school where a gunman killed 17 people last week has left the force after evidence showed he stood outside the building where the shooting occurred rather than going in, Sheriff Scott Israel said Thursday.

“He never went in,” Sheriff Israel said, describing video footage of the scene he had watched.

Asked...