The incident had caused actor Johnny Depp to become physically violent, a court heard.
The Hollywood actor had been “delusional” after finding the matter on his bed and accused his former partner of being involved, Ms Heard said.
The actress said she had not been “in a pranking mood” due to her relationship’s deterioration, and said the “disgusting” incident had caused Mr Depp to become violent.
Mr Depp is suing the Aquaman star for libel over a 2018 article she wrote in The Washington Post which his lawyers say falsely implies he physically and sexually abused her while they were together.
He has denied all accusations.
Ms Heard was asked about the incident, which happened in April 2016, shortly after her 30th birthday.
The court heard Mr Depp had discovered faecal matter on a bed at one of his properties in Englene and had called Ms Heard about the matter.
“I don’t think that’s funny, I don’t know what grown woman does. I was also not in a pranking mood.
“My life was falling apart.
“I was at a crossroads in my life. I’d just been attacked on my 30th birthday by my violent husband, with whom I was desperately in love and who I needed to leave.
“It was not really a jovial time and I don’t think that’s funny. Period. That’s disgusting.”
The court heard suggestion that the faecal matter had come from Mr Depp’s Yorkshire terrier Boo, which had “bowel control issues” after ingesting some of the actor’s marijuana as a puppy.
Ms Heard said that after confronting her about the incident in person, Mr Depp had screamed abuse at her and become physical, causing her friend Raquel Pennington, to come between the two and the actor’s security guards to intervene.
She added that as he left the apartment Mr Depp had taken a bottle and smashed several items, and that the police had been called.
Concluding her direct evidence on Monday, Ms Heard said that toward the end of their relationship violence had become “almost normal” and detailed further alleged instances.
The jury was shown red carpet photographs in which Ms Heard appeared to have marks on her arms, which she said were scars caused by Mr Depp.
Audio recordings were also played in which verbal altercations between the couple could be heard.
Mr Depp has refused to make eye contact with Ms Heard during the three days she has been giving evidence.
Long queues continued to appear outside Fairfax County district courthouse, i Virginia, with some members of the public having queued overnight for a chance to get into the courtroom to observe the proceedings.
Mr Depp has already taken to the stand to give evidence and face cross-examination and has alleged that was a victim of domestic abuse during the relationship.