figment of (one's)/the imagination
An experience that initially is thought to be real but is actually imagined. I thought I heard the sound of my front door opening last night but it turned out to be a figment of my imagination.
figment of one's imagination
Something made up, invented, or fabricated, as in "The long dishevelled hair, the swelled black face, the exaggerated stature were figments of imagination" (Charlotte Brontë, Jane Eyre, 1847). This term is redundant, since figment means "product of the imagination." [Early 1800s]