There is a rare form of melanoma that affects the nail unit, and makes up only 1% of all cases of melanoma. It usually arises from a form of melanoma that is common of the palms and soles called acral lentiginous melanoma. It commonly appears as a dark band that is visible the entire length of the nail, and over time develops in specific ways which makes it suspicious of being a cancerous nail marking. The streak tends to widen and become irregular in colour, with lighter and darker browns forming different parts of the band. The brown pigmentation may also begin to involve skin adjacent to the nail fold, and the melanoma may bleed or cause abnormal nail changes such as cracking or thinning.

Despite the rarity of this form of melanoma, due to its abnormal appearance causing delay in presentation and diagnosis it is usually progressed at time of diagnosis. This is why it is very important that your doctor checks your finger and toe nails during every skin check appointment.  

https://dermnetnz.org/topics/melanoma-of-nail-unit/