The sergeant opened fire in June 2014 at his post near the North Korean border and fled, sparking a manhunt.
He was captured two days later after he shot himself during a tense stand-off with troops.
It reignited debate on military culture in South Korea, where all males must do about two years military service.
The conscript's attack had previously been attributed by a defence ministry spokesman to his "difficulties in adapting to military life".
He had been placed on a list of conscripts requiring special attention.
In July last year, the military completed its investigation into the incident and said the attack, at a post near the border town of Goseong, was in revenge for bullying in the army and at school.
The 23-year-old recruit, surnamed Im in previous reports but named as Lim by Yonhap news agency, was found guilty of killing and injuring his comrades by detonating a grenade and firing at them.
He was also found guilty of running away with a rifle and ammunition, said the news agency.
Under South Korea's military law, a soldier must face the death penalty for killing a superior. One of those killed was a staff sergeant.
The soldier expressed remorse in a statement last month before his sentence was announced, AFP news agency reported.
"I feel deeply sorry for the victims and their relatives... I am overcome with remorse... How happy would I be, had it been merely a dream and had it been possible to return to the past?" he said.
Past incidents in South Korea's military have been linked to bullying and mental health problems.
Last year, several suicides by young conscripts were reported. In April, a private died after he was beaten by his superiors - an incident which was only uncovered months later by a civic group.
A sergeant was later sentenced to 45 years in military prison for the crime. Four other soldiers were jailed for between 15 and 30 years while a sixth was given a suspended prison sentence.
In September last year, two special forces soldiers died after collapsing during captivity training, apparently from suffocation.
The incidents sparked a public outcry and prompted the army to take a tougher stance on bullying and abuse.
Its chief of staff resigned and his replacement ordered the establishment of a military human rights commission and investigations into hundreds of bullying cases.
Prior to last year, South Korea also saw major incidents in 2005 and 2011 where conscripts killed several of their comrades.
South Korea has said it needs a conscription system to ensure national security. It technically remains at war with North Korea, as the 1950-53 Korean War ended in an armistice rather than a peace treaty.
A South Korean soldier who shot dead five of his colleagues and injured seven others has been sentenced to death by a military court.