One of the primary cancers that can affect the nail bed is subungual melanoma, a type of skin cancer that occurs under the nail. Other cancers that might lead to nail bed changes include squamous cell carcinoma and metastatic cancers that have spread from other parts of the body.