Dual-modality contrast agents for T1-weighted magnetic resonance imaging (MRI) and photoacoustic imaging have attracted substantial attention as they combine the advantages of unlimited penetration depth and high sensitivity. However, most of the reported agents are Gd-based materials that exhibit nephrotoxicity, and few studies have focused on Fe-based materials owing to their lower relaxivity. This work describes the development of an ellagic acid (EA)–Fe nanoscale coordination polymer with high longitudinal relaxivity and strong near-infrared absorption for dual-modality T1-weighted MRI and photoacoustic imaging. The longitudinal relaxivity (r1) of the prepared EA-Fe@BSA nanoparticles was 2.54 mM− s−1, an increase of 185% compared with previously reported gallic acid-Fe nanoparticles. Furthermore, in vitro and in vivo experiments demonstrate that the EA-Fe@BSA NPs are an excellent T1-weighted MRI and photoacoustic dual-modality contrast agent with the advantages of convenient synthesis and low toxicity, exhibiting great potential for clinical use in tumor imaging.