Police said the incident took place in Lower Oxford Township, Pennsylvania at about 1 a.m. on Tuesday.
"This was a brutal attack. The family is traumatized. The Pennsylvania State Police did an outstanding job responding to a remarkably volatile situation," Chester County District Attorney Tom Hogan Attorney Hogan said in a statement.
According to law enforcement officials, 23-year-old Kevin Havelow was out with a friend smoking marijuana in his mother's car when he returned to the home where he lived with his grandmother, mother and sister.
Police said Havelow asked his mother if his friend could stay the night and she said no.
That's when officials said Havelow, angry at his mother and grandmother, believing they were preventing him from having a normal social life, including having a regular girlfriend and smoking marijuana in the house, attacked his mother.
Police said Havelow dragged his mother to the ground and sexually assaulted her. She was eventually able to break free and Havelow's sister called 911.
But officials said Havelow then attacked and sexually assaulted his 81-year-old grandmother.
Havelow grabbed multiple knives out of the kitchen and stabbed his grandmother over 20 times in the stomach, chest and head, according to officials.
Police arrived at the home and were let in by Havelow's sister. Havelow was taken into custody and has been charged with first degree murder, attempted rape, and related offenses.
Though police attempted to save the grandmother, she died at the scene from her injuries.
Investigators discovered that in December 2015, Havelow was voluntarily committed to a hospital for threatening to harm himself.
"We are grateful that the quick response stopped the defendant's actions before anyone else was injured or killed," Lt. Jeremy Richard of the Pennsylvania State Police said.
"Every homicide is disturbing, but a homicide of an elderly person within a family is particularly troubling. We are all grateful for the swift response of law enforcement and the cooperation of the family to address this matter quickly, thoroughly, and justly," Hogan stated.