Baby P was just 17 months old when he died in August 2007 at the hands of his mother, Tracey Connelly, her lover Steven Barker and their lodger, Barker’s brother Jason Owen.
The boy had suffered 50 injuries, including a broken back, despite receiving 60 visits from social workers, doctors and police over the last eight months of his life.
Mr Justice Foskett ruled her controversial removal from her child safety role with Haringey Council in north London in December 2008 “cannot be impugned on the grounds of unfairness”.
Ms Shoesmith, who had been earning £130,000 a year, said her career had been ruined by a media witch-hunt, political pressure and a “flagrant breach of the rules of natural justice”.
Mr Balls acted following a damning report by Ofsted inspectors sent in by him to carry out an urgent review after the trial which led to the jailing of those responsible for the death of Baby P, now named as Peter Connelly.
The 57-year-old was removed by Mr Balls on December 1, and she was also formally sacked from her employment by Haringey council a week later.
Mr Justice Foskett said it was “too simplistic” to suggest Mr Balls had been driven by “party politics” or had been improperly influenced by media pressure, including a petition from a national newspaper.
He said he could find “no sustainable basis” for the suggestion that there was “political or other improper interference in the Ofsted inspection, or the report-writing process by, or on behalf, of the Secretary of State”.
Later Ms Shoesmith’s legal team said they were considering whether to launch an appeal.