Even if an insect did not literally creep “upon the ground,” but was born in a fruit or vegetable while that fruit or vegetable was growing―the insect is still considered to to have been “on the ground,” since the item which it inhabited was “on the ground” 15.
If, however, an insect had never been alive on the ground nor inhabited a fruit or vegetable which was growing on the ground―it is permissible 16. Consequently, if an insect was born in a fruit that was already separated from the tree―that insect is permissible.
If that insect is removed from the fruit or vegetable it inhabited―it becomes an insect that “creeps upon the ground, ” and is prohibited. This applies, whether or not the insect was alive when it was removed from the fruit or vegetable.