Vikki Thompson, 21, was found dead in her cell at HMP Leeds in 2015 with a ligature around her neck.
Robert Steele told the hearing in Wakefield Miss Thompson wrote to him while in prison saying: "I know I'm going to do something silly."
Giving evidence he said: "I believe she shouldn't have been in a male prison."
More stories from across Yorkshire
The jury inquest was also told Miss Thompson, from Keighley, had repeatedly told prison and court escort staff that she would be "carried out in a box".
Mr Steele said he spoke to her on the phone while she was in prison and she told him she wanted to move to a women's prison that and her solicitors were waiting for her to make a formal application to the governor.
Mr Steele also said he received a letter from his partner which said: "I don't think I can last very long in here. I can't sleep at night. I just feel like I won't be here no more.
"I know I'm going to do something silly. I don't want to but I can't do this."
But, in a statement read to the court, Miss Thompson's mother Lisa Harrison said her daughter did not say she had a problem being in a men's prison.
"Vikki didn't like prison but who does?" Ms Harrison said. "She never said anything to me about it being the wrong prison for her."
The inquest heard Miss Thompson had identified as female since she was 10 years old but had never had any surgical or hormone treatment.
She did not have a Gender Recognition Certificate establishing her female identity so she was sent to a men's prison.
Coroner Jonathan Leach said the inquest would examine a number of issues including the suitability of the "prison accommodation".
The jury was told that after an extensive risk assessment process Miss Thompson was initially put in E-Wing rather than A-Wing, where vulnerable prisoners were housed, and placed on a one-hour suicide watch.
Mr Leach said this decision was taken because it was thought she might be under more risk on A-Wing due to the number of sex offenders there.
He said she was later allowed to move to A-Wing but was taunted by men in the segregation block below.
The inquest heard that on the day she died Miss Thompson had been seen watching TV at 19:00 GMT but at 20:00 she was spotted on the floor with the ligature round her neck and the alarm was raised.
The inquest, which is expected to last three weeks, continues

Caterpillar is the world's largest manufacturer of heavy construction equipment.
The firm has operations in Larne, Newtownabbey and west Belfast.
Caterpillar's Northern Ireland business employs 1,800 people and mainly makes diesel generators.
The firm has been hit by a global downturn in mining and oil exploration which has reduced demand for its products.
It is understood that the company may announce cuts across its global operations beyond Northern Ireland.
It has already axed thousands of jobs worldwide since last year as part of a major restructuring programme.
Since 2011 it has shed more than 1,000 posts in Northern Ireland and moved some work to factories in China.
It is understood night-shifts have been cancelled, with staff told to expect official news on Thursday.
Caterpillar refused to comment on any jobs announcement yesterday.
But a spokesman added:  "Caterpillar is committed to communicating regularly and directly with our employees about the business environment and any resulting changes".
Sinn FÃ©in MP for West Belfast Paul Maskey said yesterday: "Uncertainty over the future of Caterpillar's operations in the north will be no doubt distressing for workers and their families."
"It is vitally important that management keep all employees up to date with the latest information as soon as possible," he added.
The American company bought FG Wilson in 1999.
There have been significant manufacturing job losses in Northern Ireland over the past year, including Michelin, JTI Gallahers and Bombardier.
The partner of a transgender woman found dead in a men's prison while on remand has told an inquest she did not want to be in a male jail.
[NEXT_CONCEPT]
Workers in Northern Ireland factories operated by US firm Caterpillar will be given details of job cuts later.