Where are the evolutionary ancestors of insects?
I would guess flatworms (or another type of worm) and other insects.
This might help you out a little:
http://www.talkorigins.org/origins/geo_timeline.html
Try this page for starters. Not too long.
This site suggests that the sister taxa to Insecta are Diplura, and the group (Protura-Collembola) – groups that I’m not too familiar with, but which seem pretty insect-like. “Hexapoda,” of course, (roughly) means “six feet.”
One level up the tree, you can see that the sister group of Hexopoda is thought to be Crustacea. Hexopoda and Crustacea are linked as sister taxa with such things as Myriopoda (millipedes and such), Chelicerata (spiders, et al), and Trilobites. These are all Arthropods.
Even more basal than that and you can see that things get pretty muddy pretty fast. The Arthropods are probably sister taxa of Tardigrades and Onchyophora (some not-very-well known, but really cool critters), and below that are related to bunches of other weird invertebrate groups.
So the predecessor to insects was probably something “wormy” and ocean-dwelling about 500 million years ago. (But, then again, the predecessor to just about every animal is something “wormy” 500 million years ago.)
Also, I hope you realize that contemporary things are not ancestors of each other. So the ancestor of Insecta is not Nematoda or something like that, but the ancestor of Insecta was a creature that was also the ancestor of Nematoda.