Ultrasmall melanin nanoparticles (MNPs) have great application potential in medical imaging, owing to its satisfactory biodegradation, intrinsic photoacoustic (PA) property and natural chelating ability with metal ions for magnetic resonance imaging (MRI). Because of its ultrasmall particle size, it was easily metabolized by the kidney, but had relatively limited tumor retention according to our previous study. To further improve the intensities of MRI and PA signals for precise diagnosis, it is vital to enhance its tumor accumulation and prolong the retention time. In this study, we developed a matrix metalloproteinase-2 (MMP-2) activatable nanoprobe (PEG-PepMMP2-MNP-Gd), which was composed of water-insoluble gadolinium-chelated melanin (MNP-Gd), MMP-2 cleaved peptide and enzymatic detachable polyethylene glycol (PEG). In the presence of MMP-2 activity, PEG-coating on the surface was peeled off and the “hidden” hydrophobic segment was then exposed, which initiated the aggregation and size increase of nanoprobes. We demonstrated that the hydrodynamic size of the MMP-2 activatable nanoprobe increased from 17.1 nm to 90.2 nm after in vitro incubation with MMP-2. Moreover, the in vivo T1-weighted MRI and PA signals in tumors were both dramatically enhanced and extended after the PEG-PepMMP2-MNP-Gd nanoparticles were intravenously injected into mice. This could be attributed to the changed size selectively activated by highly expressed MMP-2 in tumors, and allowing nanoparticles to possess higher tumor accumulation and longer retention. In short, MMP2-initiated size-changeable PEG-PepMMP2-MNP-Gd could meet the paradoxical demand for size-leading permeability and retention in solid tumors, suggesting its promising applications as a highly efficient MRI/PA contrast agent for precise tumor diagnosis.