Loughner has resisted taking the drugs.
The temporary order was issued by a federal appeals court in Phoenix on Friday.
Loughner faces charges in the deadly shooting spree that killed six and wounded 13, including Rep. Gabrielle Giffords. He has pleaded not guilty.
Earlier this year, a judge ruled that Loughner was mentally unfit to stand trial.
Prison officials said Loughner has psychological problems and needs the medication. He has been at a Springfield, Mo. federal prison since May 28.
The Associated Press contributed to this story.