A simple approach has been developed to synthesize lanthanide based multifunctional magnetic-fluorescent hydrogels for cellular imaging via MRI and optical imaging synchronously. The multifunctional hydrogels are prepared by covalently conjugating gadolinium and europium chelate with biocompatible chitosan. The room temperature photoluminescence (PL) spectrum shows that the hydrogels have a strong PL emission, which is characteristic of Eu3+ transitions from the excited 5D0 to 7FJ levels. Moreover, in vitro magnetic resonance imaging (MRI) analysis shows that the hydrogels exhibit powerful T1-weighted MRI signal in water. As a result, the hydrogels combine magnetic and fluorescent properties and can be expected to act as a promising multimodal MRI/optical imaging probe.