Pigmentation of the oral mucosa is relatively common and has a wide variety of etiologies. Although most pigmented lesions of the oral mucosa are associated with deposition of melanin and accidental displacement of a dental alloy, accurate differential diagnosis of a pigmented lesion is important, especially in the case of malignant melanoma. We report two cases of oral mucosal pigmentation associated with accidental displacement of a dental alloy in which malignant melanoma was suspected. Excisional biopsy was carried out in these cases with the incision line set at approximately 5 mm from the lesions. Histopathologically, brownish foreign substances were observed in the lamina propria. Metal quantitative analyses of the extracted specimens were carried out by electron probe microanalysis (EPMA). The metal components and the mass concentration revealed that the metals were derived from a dental casting silver alloy in Case 1 and from a gold-silver palladium alloy in Case 2. Although exogenous pigmentation originating from a dental alloy is not rare, differential diagnosis of oral pigmented lesions is sometimes very difficult. In such cases, histopathological examination may be necessary for the diagnosis to exclude melanocytic lesions and EPMA may be effective to identify the causative dental alloy.