Different types of electron transfers (ETs) underlie the versatile use of various solid viologen-derived compounds, which is still insufficiently understood and difficult to control. Here, we demonstrate an effective strategy for modulating the key ET process in crystalline metalloviologen compounds (MVCs). By adjusting the coordinated transition metal ions bearing different electronic structures (e.g., d 5 , d 7 , d 10 ), three MVCs (i.e., Mn-1, Co-2, and Cd-3) with highly consistent coordination environments have been synthesized successfully. Surprisingly, whether the photochromism (energy-induced ET mechanism) or the specific analyte recognition (molecule-induced ET mechanism), compound Cd-3 exhibits obvious photochromic behavior and differential dimethylamine detection. Combined detailed structural analysis with theoretical calculations, such unique ion-dependent properties, were correlated to the fine modulation of the electron density of the bipyridinium cores by metal ions. Additionally, thanks to the delicate recognition of dimethylamine vapor, a convenient test strip Cd-3-PAN was prepared as a sensitive biogenic amine sensor for evaluating the real-time freshness of seafood.