"lacking in money," 1590s, from assimilated form of in- "not, opposite of" (see in- (1)) + Latin pecuniosus "rich," from pecunia "money, property" (see pecuniary). Related: Impecuniously; impecuniosity.
word-forming element meaning "not, opposite of, without" (also im-, il-, ir- by assimilation of -n- with following consonant, a tendency which began in later Latin), from Latin in- "not," cognate with Greek an-, Old English un-, all from PIE root *ne- "not."
In Old French and Middle English often en-, but most of these forms have not survived in Modern English, and the few that do (enemy, for instance) no longer are felt as negative. The rule of thumb in English has been to use in- with obviously Latin elements, un- with native or nativized ones.
c. 1500, "consisting of money;" 1620s, "relating to money," from Latin pecuniarius "pertaining to money," from pecunia "money, property, wealth," from pecu "cattle, flock," from PIE root *peku- "wealth, movable property, livestock" (source of Sanskrit pasu- "cattle," Gothic faihu "money, fortune," Old English feoh "cattle, money").
Livestock was the measure of wealth in the ancient world, and Rome was essentially a farmer's community. That pecunia was literally "wealth in cattle" was still apparent to Cicero. For a possible parallel sense development in Old English, see fee, and compare, evolving in the other direction, cattle. Compare also Welsh tlws "jewel," cognate with Irish tlus "cattle," connected via the notion of "valuable thing," and, perhaps emolument.
An earlier adjective in English was pecunier (early 15c.; mid-14c. in Anglo-French), from Old French; also pecunial (late 14c.).
Others are reading
<a href="https://www.etymonline.com/word/impecunious">Etymology of impecunious by etymonline</a>
Harper, D. (n.d.). Etymology of impecunious. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/impecunious