Melanonychia is caused when the pigment cells, called melanocytes, deposit melanin — brown-colored pigment — into the nail. These deposits are usually grouped together. As your nail grows, it causes the stripe of brown or black to appear on your nail.