The state had asked for the evaluation after a psychiatrist told the court this week that Pistorius, who is on trial for the murder of his girlfriend Reeva Steenkamp last year, suffered from an anxiety disorder.
Prosecutor Gerrie Nel has argued he wanted to prevent the 27-year-old sprinter, who faces life in prison if convicted, from later appealing on the basis of a disturbed mental condition.
Defence lawyer Barry Roux had argued against the motion, saying it was “premature” to have the evaluation done now, as he planned to call other witnesses.
But Judge Thokozile Masipa ruled that a mental assessment would ensure that Pistorius gets a fair trial.
Masipa said the court would hand down the details of the assessment on Tuesday, adding it would be preferable for him to undergo the evaluation as an outpatient.
Pistorius has denied he killed Steenkamp in cold blood, saying he shot four times at the toilet door of his luxury Pretoria home to protect himself from what he thought was an intruder.
Pistorius competed against able-bodied sprinters on carbon-fibre prosthetics, becoming one of the most recognised names in athletics. He won a clutch of Paralympic medals and reached the semi-finals of the 400m at the London 2012 Olympics.