As a highly aggressive malignancy, the issue of curing melanoma at an advanced stage could suffer from severe metastasis and a lower 5-year survival rate. Therefore, the early diagnosis of melanoma with high accuracy is vital and contributes to a significantly improved 5-year survival rate. This work reports a dual-locked receptor, m-BA-Hcy, which releases the near-infrared (NIR) fluorophore Hcy–OH upon the dual activation of reactive oxygen species (ROS) and tyrosinase (TYR). The substitution of boric acid on the phenyl ring was studied, which influences the feasibility of the performance of the envisaged cascade reaction. The sensing behavior was discussed in terms of optical spectroscopy and reaction mechanism, and imaging was fully performed at the cellular and organism levels. Receptor m-BA-Hcy was hence clarified to possess supreme sensitivity and accuracy for melanoma detection.