Stephen Nicholson, 24, appeared on a video-link at Southampton Crown Court on Friday morning to plead guilty to the charge under the Regulation of Investigatory Powers Act (Ripa).
Nicholson refused access to his Facebook to detectives investigating any private messages sent between himself and 13-year-old Lucy, who lived in Mansel Road, Southampton.
Nicholson, a carer of no fixed abode, was jailed by Judge Christopher Parker QC for 14 months.
Judge Parker did not accept Nicholson’s “wholly inadequate” excuse that providing his password would expose information relating to cannabis.
“What you have done is obstructed the investigation, and a very serious investigation indeed. It has caused a very significant delay,” the judge said.
“It means that the task of police investigating the murder of Lucy McHugh is that much more difficult.”
Matthew Lawson, prosecuting, said police are following the “lengthy procedure” to get the information from Facebook itself.
Lucy’s body was found in woodland at Southampton Sports Centre on July 26.
Nicholson, who was arrested on suspicion of murder and sexual activity with a child, was released on police bail on July 31 but later remanded in custody after he was charged for failing to provide his Facebook password to detectives.
He is understood to have been living with the family in the months before the teen’s death and was a colleague of Lucy’s mother, a care-worker, as well as a part-time tattooist.
Hampshire police have made repeated appeals to the public, including screening CCTV footage of Lucy’s last known movements to the crowd at Southampton Football Club’s St Mary’s Stadium a few weeks ago.
It shows Lucy walking past a convenience store in Wimpson Lane at 9.06am and on Coxford Road near Southampton General Hospital at 9.22am on July 25.
And a £10,000 reward has been offered by Crimestoppers for information leading to the arrest and conviction of her killer.
A force spokesman said detectives had requested the support of the National Crime Agency (NCA) for their “expertise in specific aspects of our murder investigation”.
Lucy was last seen wearing a distinctive black jacket with white sleeves, the logo for the band Falling in Reverse on the front and RADKE 01 in red on the back, white vest top, camouflage leggings and black and white Jordan 23 trainers.