Elicit is a verb that describes drawing something out from someone, like laughter or a confession. Illicit, on the other hand, is an adjective that characterizes something illegal or otherwise unacceptable, like drugs or forbidden love.
When one elicits something, they are coaxing a desired response or piece of information from someone with their actions or line of questioning. The desired responses can be emotional (like sympathy or anger) or something more directly observed (like a smile or tears). The information could be anything previously hidden, such as a confession or a secret. Elicit comes from the Latin roots ex, meaning "out," and lacere, meaning "to entice or lure," combining to make a word that in a sense means "to lure out."
He does not even lift an eyebrow at feats that elicit applause or gasps, or the occasional shriek of surprise, from the rest of the rapt audience. (The Night Circus)
The [National Park Service's] request for information from the public elicited dozens of calls and messages, a video uploaded to YouTube, and finally a confession. (New York Times)
Though they sound the same, illicit is an adjective that means "not allowed by law or custom." Illicit is commonly used with regard to the law or licensing, but it can also refer to something that is prohibited or condemned for ethical or moral reasons. Illicit uses the prefix il- to become an antonym of the lesser known licit, a derivative of the Latin licitus meaning "lawful."
The company will develop tools that give the Pentagon a granular view of crypto markets’ inner workings, in part to help authorities crack down on illicit uses of digital assets. (Washington Post)
In this telling of the story, Lancelot and Guinevere are already deeply consumed by illicit love. (New York Times)
Here's an easy way to remember the difference: elicit starts with an e like evoking emotions and extracting evidence, while illicit starts with an i like illegal, immoral, and inappropriate.