Nicotine is one of the primary chemicals used in many pesticides..........
It's not effective on all of them, as anyone who's ever been stung by a tobacco worm can attest.