Elizabeth Birtwistle, 32, of no fixed address, was given a hospital order at Preston Crown Court for the manslaughter of Raymond Conlan, 75.
Police were called around 3.50am on March 6, 2020, to a report of a serious assault at an address in Cedar Grove, Longton.
Emergency services attended with Mr Conlan, 75, found inside the property with serious injuries to his head and body.
He was treated by paramedics at the scene but sadly died.
A Home Office post mortem examination gave a cause of death as stab wounds.
Birtwistle was arrested on suspicion of murder and later detained under the Mental Health Act.
She was charged with murder but following consultation with the Crown Prosecution Service, a guilty plea to manslaughter was accepted.
Birtwistle was handed an indeterminate hospital order.
Det Insp Mark Haworth-Oates, of Lancashire Police, said: “This is a really tragic case where the defendant carried out a violent assault on the victim, her grandfather Raymond Conlan, leaving him with fatal injuries. The plea of manslaughter was only accepted after careful consideration of comprehensive psychiatric evidence from two experts, who agreed that Birtwistle was in a psychotic state at the time of the incident and suffering from long term mental illness. Birtwistle will be detained in a secure hospital for an undetermined period and remain under the supervision of mental health services for the rest of her life.
“I’d like to pay tribute to the dignified way in which Mr Conlan’s family have acted throughout the investigation. Sadly, the result provides no relief from the tragic loss that they have suffered.
“No family should have to go through such an ordeal and my thoughts remain with them at this difficult time.”