Figment comes from the Latin word "figmentum", meaning something formed or fashioned to make a shape. The Latin word comes a a Proto-Indo-European prefix "dhiegh-" meaning to form or build.

This prefix informs a variety of modern English words: dough, feign, feint, fiction, effigy, paradise (lovely place with wall made around it), lady (bread-kneeder in Old English), and figure (a visible or tangible shape or form of something).

This page heavily steals from this post by Mel Campbell.