Judge Thokozile Masipa, issuing the ruling, also gave Pistorius a three-year suspended sentence for a firearms charge.
He was later driven to Pretoria’s Kgosi Mampuru prison where he is expected to be housed in the hospital wing.
The prosecution had called for a minimum 10-year sentence; the defence for community service and house arrest.
Pistorius was convicted of culpable homicide but cleared of murder.
Judge Masipa began reading the sentence by saying that, although she had been aided by assessors, the decision was hers and hers alone.
She said: “Sentencing is about achieving the right balance. Sentencing is not a perfect exercise.”
She said there must be a balance between retribution, deterrence and rehabilitation.
The judge then summarised the evidence brought before the trial.
She described the evidence of defence witness and social worker Annette Vergeer as “slapdash and disappointing”.
Ms Vergeer had argued Pistorius would be “a lot more vulnerable than the normal man” in jail.
But Judge Masipa said she was sure prisons were equipped to cater for the requirements of a special needs inmate.
Pistorius, 27, an amputee sprinter who became the first athlete to compete in the Olympic and Paralympic Games, killed Ms Steenkamp on Valentine’s Day last year.
He says he shot her by mistake, fearing there was an intruder in his house in the capital, Pretoria.
Ms Steenkamp, a 29-year-old model, reality TV star and law graduate, was hit three times by bullets fired by Pistorius through a toilet door.
Last month, Judge Masipa cleared Pistorius of murder, but convicted him of culpable homicide, saying he had been negligent.
The high-profile, seven-month trial has captured public attention in South Africa and beyond.
There was no legal limit on the length of a jail term, but experts say the typical maximum sentence for culpable homicide is around 15 years.
However, despite the sentencing being announced, the case may not be over.
Both the prosecution and the defence have the right to appeal against the sentence.
Legal observers say Pistorius could spend just 10 months in jail and, provided he poses no trouble to the prison authorities, could spend the remainder of his sentence under correctional supervision at home.