You should not attempt to treat ingrown toenails yourself. Instead, see a doctor. A doctor may treat the ingrown toenail by gently inserting sterile cotton under the nail. This may help reduce swelling. In more serious cases, the doctor may remove part of the nail. A doctor may prescribe antibiotic pills or ointments if he or she suspects an infection.