Julia Knight, 56, denies attempting to murder Irene Robson, 81, at Horton Hospital in Banbury in October 2014, but admits administering the insulin.
She told told a jury at Oxford Crown Court she did it so that she would not be discharged from hospital.
Ms Knight also denies causing grievous bodily harm with intent.
She told the court she wanted her mother to remain cared for and not be sent home.
She said: "I felt terrible because I knew I was going to make mum unwell.
"It was a stupid, stupid, thing to do. If I could go back and change it, I would."
She admitted she told a series of lies to police in January when she was questioned.
The court heard she had a forged a prescription for insulin, which she had collected at a Sainsbury's store in Banbury.
When asked by defence barrister Simon Mayo QC why she had insisted to officers she had not injected her mother, she said: "I realised it was serious. I was ashamed of what I had done."
Prosecutor John Price QC claimed she had intended to administer a lethal dose to Ms Robson before leaving the Horton.
He asked: "Why did you inject your mother with a substance which for all you knew could kill her within five minutes and do nothing for an hour and twenty minutes?"
She replied: "I never intended my mother to die."
Ms Knight also told the court she had attempted suicide in 2006 by injecting herself with insulin.
Ms Robson died in September but the jury was told earlier in the trial that her death was not relevant to the case and had no bearing on the issues they had to consider.
The trial continues.
A nurse who injected her mother with a potentially lethal dose of insulin has told a court she only wanted to make her a "little bit poorly".