Gary Douglass, 20, tried to cut his own throat and also stabbed himself in the stomach in October 2013.
Two days after being discharged from hospital and while being held at Liverpool's Altcourse prison, his condition deteriorated.
Mr Douglass, who was facing an attempted murder charge, died on 12 October during emergency surgery.
The inquest heard Mr Douglass had Asperger's Syndrome and had a fascination with knives.
He was arrested on 2 October after a 19-year-old man was stabbed in Wrexham.
Mr Douglass was armed with two knives and had been seen threatening people in the town.
On Monday, his father, Christopher Douglass, told the inquest he was "very surprised" his son was released from hospital and into custody.
"He looked like he was in pain?" asked the coroner.
"Definitely," said Mr Douglass.
Christopher Douglass said he believed, but had no evidence to prove, police had put pressure on the hospital to release his son.
The inquest continues.
A Wrexham man who stabbed himself as police tried to arrest him later died while on remand, an inquest has heard.