The eyewitness, who is not named in the court documents dated September 16, said she had a "romantic relationship" with Goforth "during the preceding 15 months."
She took a polygraph test and gave statements that are now in the hands of defense attorneys, court records also show.
"It's (expletive)," said Stephen Allison, Goforth's brother-in-law, in response to the alleged affair.
"I'm shocked by the question and by the allegation. As his good friend, I adamantly believe that's a lie. There's nothing farther from the truth," Robert Partin, a family friend, told Eyewitness News. "I will do everything in my power to keep his image from being tainted."
"Even in a horrific crime like this people are suspicious of potential cover-ups. And cover-ups sometimes cloud the investigations, and they cloud the real intent of what happened in this case," said Joel Androphy, a defense attorney and court expert who is not involved with the Goforth case. "We all see what happened, but nobody's drawing any conclusions and nobody should yet.
"This clouds the investigation. It clouds people's thinking about what really happened because people are suspicious of the government to begin with."
PHOTOS: Dep. Darren Goforth's memorial service
ABC13 reporters on the scene August 28, the night Goforth was killed, talked to witnesses who saw a woman in dressy clothing crying over the deputy's body.
Other eyewitnesses said she called Goforth her "best friend," while over the body that evening.
Sheriff's officers made no mention of such a witness the night of the murder, and abc13 reporters were unable to find her in the following days.
It is believed she is the woman mentioned in the court filing.
Shannon J. Miles, 30, had been in custody since August 29, and is charged with capital murder in the Goforth killing.
No motive has been announced. There is no documented connection between that woman and Miles.
"This is still a fluid case working with the DA to make sure she has all the information," Harris County Sheriff Ron Hickman told ABC13 Friday.
Miles' defense attorney Anthony Osso also said Friday he was aware of the court filing and had already started to develop similar information.
He said it is far too soon to tell what it will mean to the case.
The crime is after all on video but Androphy suggests injecting eyewitnesses who have personal connections to the victim, may cloud what until now seemed to be an easy case for prosecutors.
"In a criminal case all you need is reasonable doubt," Androphy said. "The state could have done a better job of investigating and asking this person questions up front if this person had an affair or have a relationship with the deceased."
Investigators had the unfortunate duty of informing Goforth's widow of the court document before it was entered into the public record.
Goforth's killing made national headlines when he was murdered. Hickman called the killing a "cold-blooded assassination" and criticized the 'black lives matter' movement.
"Cops' lives matter, too," Hickman said at the time. "So why don't we drop the qualifier and say lives matter."
Investigators say Goforth had worked an accident scene at around 8:30pm, then went to a gas station on Telge and West road.
As he was pumping gas, detectives say Miles approached Goforth from behind, said nothing, and fired multiple shots at the deputy. Once he fell to the ground, authorities said Miles fired more shots into Goforth. Goforth was pronounced dead at the scene.