Equal weight must be given to the needs of other prospective parents, Dr Philip Hunter said.
His ruling was the latest in a long-running battle between Cams Hill secondary, in Fareham, and Hampshire council.
Cams Hill said local children would not be denied places and that prioritising children of staff helps to boost their morale, which in turn benefits other pupils. The fact that children of staff are on roll - there are eight at the 1,050-pupil school - was seen as a vote of confidence in the school by other parents, it said.
But Dr Hunter said schools should allocate places according to the needs of pupils, not parents.
"Public services should not be in the business of granting benefits to families who work in them," he said. "Parents of children who do not get a place might have found it equally convenient for other reasons if their children had been admitted. Improvements in the morale of staff who secure places at the school has to be weighed against the negative effect on the morale of rejected parents in their no doubt equally worthy jobs."
The decision will prevent the school from reinstating a clause in its admissions policy to give priority to the children of staff.