In the 2370s, Starfleet commissioned Doctor Lewis Zimmerman, the leading expert on holotechnology, to create a tiny spy hologram for the "Trojan Horse Project". Roy, being small enough that no one would notice, was successful. He was then returned to Jupiter Station, where Dr. Zimmerman kept him as a pet.
Haley was always telling Roy to stay off the food, especially Doctor Zimmerman's salad. In 2377, when The Doctor came to the Alpha Quadrant to treat Doctor Zimmerman for a fatal disease, he got so annoyed that he smashed Roy with a book, leaving everyone in the room apparently shocked. (VOY: "Life Line")