The Ant Lion can be trained from Barley in Khrysalis for 75,000 gold.
However, to have him unlocked, you've to complete a series of quest first, including defeating Eclipse Tower (where you're firstly introduced to Shadow Magic).
He's in Silent Market.
The spell cannot be crafted.
Remember Pixies can also do away with pest of any rank on one plant for a 48 hour period!