Judge Thokozile Masipa told Pistorius he must report to Pretoria's Weskoppies hospital, one of South Africa's top mental institutions, as an outpatient for up to 30 days, starting on May 26.
The evaluation would determine "whether the accused by reason of mental illness or mental defect was at the time of the commission of the offence criminally responsible for the offence he is charged and whether he was capable of appreciating the wrongfulness of his act".
Pistorius, dressed in a black suit and tie, stood sombrely in the dock as Masipa read out the order before postponing the case to June 30.
The Olympic star could face a life sentence if he is found guilty of murdering his model girlfriend Reeva Steenkamp, who he shot and killed at his high security home in Pretoria on Feb. 14 last year.
Pistorius denies killing Steenkamp in cold blood after an argument, as suggested by prosecutors, and insists he shot four times at the toilet door she was behind, in self defence against 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.