Jared Loughner is accused of killing six people and wounding 13 others, including Congresswoman Gabrielle Giffords, in January.
He was declared mentally unfit to stand trial and sent to a mental hospital where prison doctors prescribed anti-psychotic medication as treatment.
The ruling by a three-judge panel of the 9th Circuit Court of Appeal kept in place an earlier order that temporarily stopped the involuntary medication of Loughner. The order will remain in effect until the court rules on an appeal by Loughner's attorneys over the larger issue of forced medication.
However, authorities can take steps to maintain the safety of prison officials, other inmates or Loughner, including forcibly giving him tranquilizers.
The Associated Press contributed to this story.