Neosporin should not be used to treat an ear infection. Neosporin's label states that it is used to treat burns, cuts and scrapes. As of 2015, Neosporin's website states that their product should not be used to treat conditions not listed on the product's label.
If an ear infection persists, the person suffering should seek medical attention. A doctor can determine if the ear infection is caused by a virus or bacteria. If the infection is caused by a virus, over-the-counter pain relief medications may be used to ease discomfort. If the ear infection is caused by bacteria, a doctor may prescribe antibiotics to clear up the infection.