Middle English word formed to translate Latin conscientia; early 13c., "conscience;" c. 1300, "reason, intellect," from in (adj.) + wit (n.). Not related to Old English inwit, which meant "deceit." Joyce's use of it in "Ulysses" (1922) echoes the title of the 14c. work "Ayenbite of Inwyt" ("Remorse of Conscience," a translation from French) and is perhaps the best-known example of the modern use of the word as a conscious archaism, but it is not the earliest.
Þese ben also þy fyve inwyttys: Wyl, Resoun, Mynd, Ymaginacioun, and Thoght [Wyclif, c. 1380]
If ... such good old English words as inwit and wanhope should be rehabilitated (and they have been pushing up their heads for thirty years), we should gain a great deal. [Robert Bridges, English poet laureate, 1922]