Turn out all lights in the room and make sure that it is completely dark. Turn on a battery powered flashlight, hold it about 1 inch away from the opening of the ear and focus light into it. Most bugs have a tendency to crawl or fly towards light when they themselves in a dark area. Check if the bug in your ear does the same. If not, move on to the next step.
Carefully pour a few drops of mineral or olive oil. The quantity of oil should be enough to fill the entire ear canal. Make sure the opening of your ear is upwards before you put oil into the ear canal. Allow at least a couple of minutes for the mineral or olive oil to set in properly. As you are waiting, tuck at your ear lobe a few times. After 2 minutes, rotate your head so that oil freely runs out of the ear canal. Check if the bug in your ear comes out with the oil.
If none of the above techniques work, immediately consult a doctor. Apart from removing the bug from your ear, the doctor will examine to check if your ear canal was stung by the bug and accordingly prescribe proper medication, if required. Be sure to follow any directions you get from your doctor because your hearing might get damaged as a result of a bug bite.