The court ruled unanimously that the Secret Service agents are immune from a lawsuit because they did not violate the protesters' First Amendment rights.
The case sprang from a 2004 incident when Bush was campaigning for a second term. Secret Service agents moved the protesters from their assigned place after Bush decided to change his itinerary to make a meal stop.
Justice Ruth Bader Ginsburg, writing for the entire court, said the president's change in plans put the protest group within weapons range while the supportive group was not.
"The map corroborates that, because of their location, the protesters posed a potential security risk to the President, while the supporters, because of their location, did not," Ginsburg said.
The decision overturns a finding by a federal appeals court that the agents violated the protesters' rights and could be sued. The Ninth Circuit found there was no security rationale for the move.