Nathan Maynard-Ellis, 30, claimed a voice told him to "do it" before he assaulted Julia Rawson, 42, at his flat in Tipton last year and then was told to "get rid of her" body, jurors heard.
Maynard-Ellis and his boyfriend David Leesley, 25, are accused of murdering Ms Rawson at their home address in Mission Drive, Tipton, on May 12, 2019.
Both defendants have pleaded guilty to concealing a corpse while Maynard-Ellis has also pleaded guilty to dismembering her body.
Coventry Crown Court was told Maynard-Ellis was diagnosed with "schizophrenic traits" and heard voices long before he allegedly killed the former Dudley market stallholder.
The pair went back to his flat after a chance meeting at the Bottle & Cork micropub in Dudley when Miss Rawson swore at Maynard-Ellis and hit him, the defendant claims.
In response, Maynard-Ellis said a voice then told him to "stop her" before he grabbed a rolling pin nearby and struck her.
Psychiatrist takes the stand
The defendant revealed this account to a forensic psychiatrist called Dr Nicholas Kennedy who gave evidence at Coventry Crown Court.
Mr Karim Khalil QC, prosecuting, asked Mr Kennedy: "Did he say he heard voices saying 'stop her', 'do it now', the voice kept saying 'do it now'?"
Mr Kennedy replied: "Yes. He grabbed something, he thinks it was a rolling pin, and hit her with it."
More from the trial:
The court was told that Miss Rawson fell backwards and hit her head. At this point, Maynard-Ellis took her to his bathroom where he alleges he tried to clean the blood off her.
Mr Kennedy continued: "He said he took her to the bathroom and tried to sit her upright. She was breathing strangely and he kept telling her it was going to be okay.
"Then she stopped breathing and after a while he realised she had died.
"He said his partner [Leesley] was asleep in the bedroom. He said a voice told him to get 'rid of her' and after a while he did so.
"He said he lifted her into the bath and cut into her with a saw. He found it quite hard. He said a voice told him to 'get on with it'."
Jurors were told Maynard-Ellis began hearing voices aged about 13-years-old. The defendant used to hear two voices but "now mostly hears one", said Mr Khalil.
Recalling evidence in Mr Kennedy's report, Mr Khalil said: "He said he heard lots of things. The voices were saying all kinds of nasty things mainly about him."
In 2012 he was diagnosed with schizophrenic and autistic traits.
The court heard about one incident in which Maynard-Ellis threatened his mother after he was admitted to health services under Section 2 of the Mental Health Act.
Mr Khalil said: "He visited his mother under the influence of alcohol. He told her to make herself safe. She locked herself in her room.
"The police were called by his sister. Knives were lined up in the kitchen.
"He didn't attack his mother but warned her against him."
Miss Rawson's body parts were found buried across two sites close to a canal in Tipton near the defendant's home after her alleged murder.
Both defendants have also also admitted to perverting the course of justice.
Maynard-Ellis has further been charged with four counts of rape against a different victim, alongside one count of attempted rape and threats to kill.
The trial continues.