Stephen Nicholson, 25, is accused of repeatedly stabbing the 13-year-old to the neck and upper body in woodland at Southampton Sports Centre before leaving her to die in July last year.
The defendant, who is also a tattoo artist, is charged with Lucy's murder as well as three counts of rape against her when she was aged 12.
He also faces two charges of sexual activity with a child against Lucy on multiple occasions when she was aged 13.
Nicholson is also charged with sexual activity with a child in relation to another girl aged 14, dated June 29 2012.
William Mousley QC, prosecuting, told Winchester Crown Court that Nicholson had ‘an interest in underage sex’ and exploited Lucy who he described as ‘vulnerable’.
He said: ‘This case concerns the vicious murder of Lucy McHugh, a 13-year-old girl, in woodland within the precincts of the outdoor Southampton Sports Centre.
‘She was repeatedly stabbed to the neck and upper body and she bled to death as a result.
‘The killer, who the prosecution alleges, was Stephen Nicholson, then left her either dying or dead in a large area of woodland and made his escape.
‘It had clearly been the intention of her attacker to kill her, in other words, she had been murdered.’
Mr Mousley said that Nicholson told police after he was arrested that on the night before her death, Lucy had sent him a Facebook message saying that she was pregnant.
Mr Mousley said that Nicholson had been a lodger at Lucy's home where she lived with her mother, Stacey White, her mother's partner, Richard Elmes, and her siblings.
The prosecutor said Lucy had kept a diary which detailed her sexual relationship with the defendant dating back to May 2017.
On May 30 2017, she wrote: ‘Dear Jackass, Last night was amazing, Stephen and I slept together multiple times.
‘Mr Stephen Nicholson took my virginity, it was mainly intercourse but there was also oral.’
Mr Mousley said that Lucy described ‘increasingly violent’ sex which included descriptions of him grabbing her neck.
He also read a note titled ‘Abuse’ which Mr Elmes found after it had gone through the washing machine which stated: ‘He would make me or rape me anyway.’
Lucy had also written a letter stating: ‘To Stephen, I need a break from whatever we are because I am not in the right mind for what we are now. You are a complete ass unless we are having sex.’
Mr Mousley said the diary described Lucy and the defendant making arrangements for them to meet in each other's rooms for sexual encounters and the pair had sent naked photos to each other.
And he said that Lucy had told friends that she was pregnant but she later said that she had been referring to her mother being pregnant.
Mr Mousley said that Nicholson was also accused of having sex with a 14-year-old girl in 2012 in the same area of woodland where Lucy's body was found.
He said that Nicholson claimed that Lucy's diaries and allegations were the ‘fantasies of a 12/13-year-old girl’ and he denied having sex with the other alleged victim.
Mr Mousley said that Nicholson, who was staying at his mother's house at the time, visited Lucy's home on July 23 to feed his pet reptiles that he kept there and ended up in an argument with her.
He said that Lucy was heard to shout at the defendant ‘This is all your faul’ and ‘I have got a hold on you anyway’.
Lucy left her home in Mansel Road East, Southampton, Hampshire, at about 9am on July 25.
The jury was shown CCTV footage of Lucy walking to the sports centre where her body was found the next morning.
Mr Mousley said that clothing was found at another area of woodland called Tanners Brook which had DNA links to both Lucy and the defendant.
He said the defendant had also destroyed his trainers in a bonfire on the day Lucy died.
Nicholson denies the charges and the trial continues.