"Casto refused to exit the attic space despite police commands, so they entered the confined space and removed him by force," a Mt Juliet Police spokesman said, according to ScoopNashville.com.
He was charged with one count of aggravated criminal trespass and warned to have no further contact with the child.
Stories of strangers hiding in people's attics may sound like the stuff of urban legend, but such reports are common all over the world.
In 2008, a man found a strange woman sleeping in an unused cupboard in his home in Fukuoka, southern Japan, after setting up a secret camera when food kept mysterious disappearing from his kitchen.
In 2012, a woman in the US state of South Carolina discovered her ex-boyfriend living in her attic more than 12 years after they broke up.
In February this year, a North Carolina college student, who feared a ghost was haunting her digs after objects started disappearing and hand prints appeared on the walls, came home to find the real culprit, a homeless man, wearing her clothes.