Melanonychia, a black line on your nail, can be a sign of melanoma or benign pigmentation changes. Injuries, medications, and conditions like hyperthyroidism may also cause dark lines on your nails.