"not according to good policy," c. 1600, from assimilated form of in- (1) "not, opposite of" + politic (adj.) "judicious." Related: Impoliticly. Impolicy "quality of being impolitic" is attested from 1747.
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.
early 15c., politike, "pertaining to public affairs, concerning the governance of a country or people," from Old French politique "political" (14c.) and directly from Latin politicus "of citizens or the state, civil, civic," from Greek politikos "of citizens, pertaining to the state and its administration; pertaining to public life," from polites "citizen," from polis "city" (see polis).
It has been replaced in most of the earliest senses by political. From mid-15c. as "prudent, judicious," originally of rulers: "characterized by policy." Body politic "a political entity, a country" (with French word order) is from late 15c.
<a href="https://www.etymonline.com/word/impolitic">Etymology of impolitic by etymonline</a>
Harper, D. (n.d.). Etymology of impolitic. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/impolitic