The subject is raised again when Hewitt's character is asked if he knows who Harry's dad is, replying: "Of course I do".
The play, which has already had a successful stint in New York, is due to open at the Charing Cross Theatre in London's West End on January 9 and play until mid-February.
Mr Conway said he had spent two years interviewing Hewitt, 56, and had elicited some "remarkable" admissions during their conversations.
"There is a startling revelation that James Hewitt makes and he has allowed me to make it in the play", he said.
"This is the fact that his relationship with Diana started 18 months before Prince Harry was born."
The rumour, which has dogged the Royal Family for years, first emerged in the mid-1990s when Diana's affair with Hewitt became public knowledge for the first time.
Royal commentators have repeatedly rebuffed the claim, saying the affair did not start until 1986, two years after Prince Harry was born, and the claims drove Diana "wild with fury".
Penny Junor, the author of a new biography of Harry, says Hewitt was not on the scene in 1984, and points to a negative DNA test conducted by the News of the World in 2003 on a strand of Harry's ginger hair.
"If Harry had been shown to be James Hewitt's son, you can be sure we'd have known", she said.
Neville Thurlbeck, the News of the World's former chief reporter, dismissed it as a "conspiracy theory" that had been "killed by Fleet Street years ago".
The play follows an investigator as he tries to uncover the truth behind Princess Diana's death in a Paris car crash with then-lover Dodi Fayed in 1997.
Mr Conway based his script on a series of books by investigative journalist John Morgan, and drew on interviews with Hewitt and Diana's former butler, Paul Burrell, as well as transcripts of the inquest into her death.
He said audience members will be able to decide themselves whether Hewitt's revelation is true, and whether they believe his public denials about fathering Harry.
Hewitt confirmed he had been interviewed for the play and that he believed it was "accurate", but denied having read the actual script.
In 2003, he firmly denied being Harry's father, although admitted there were similarities between the two of them.
"There really is no possibility whatsoever that I am Harry's father", he said.
"I can absolutely assure you that I am not.
"Admittedly the red hair is similar to mine and people say we look alike.
"I have never encouraged these comparisons and although I was with Diana for a long time I must state once and for all that I'm not Harry's father."
He added that Prince Harry was already a toddler when he met Diana.