Gevin Allen Prince, 16, pleaded guilty but mentally ill in a Douglas County court to killing Mary Joan Gibbs, 77, in August 2011, The Atlanta Journal-Constitution reported Wednesday.
Prince suffers from Asberger's syndrome, which can make a person unable to deal with some social situations.
District Attorney David McDade said Prince had a history of attacking family members but the grandmother and great-grandmother had covered for him after a prior attack.
On the day of the killing, the teen attacked his grandmother, Laura Prince, after she refused to let him use the computer, stabbing her with a kitchen knife, McDade said. Prince fled to the bathroom and when the great-grandmother came to help her, Gevin attacked her.
Gibbs ran into the yard, where Gevin killed her with a sword.
An uncle testified that another nephew living in the house kept 30 swords, but the uncle thought all the swords had been removed after a previous attack.
The teen will be eligible for parole in 30 years.
2014: The Year in Music [PHOTOS]