Neuromodulation technologies are crucial for investigating neuronal connectivity and brain function. Magnetic neuromodulation offers wireless and remote deep brain stimulations that are lacking in optogenetic- and wired-electrode-based tools. However, due to the limited understanding of working principles and poorly designed magnetic operating systems, earlier magnetic approaches have yet to be utilized. Furthermore, despite its importance in neuroscience research, cell-type-specific magnetic neuromodulation has remained elusive. Here we present a nanomaterials-based magnetogenetic toolbox, in conjunction with Cre-loxP technology, to selectively activate genetically encoded Piezo1 ion channels in targeted neuronal populations via torque generated by the nanomagnetic actuators in vitro and in vivo. We demonstrate this cell-type-targeting magnetic approach for remote and spatiotemporal precise control of deep brain neural activity in multiple behavioural models, such as bidirectional feeding control, long-term neuromodulation for weight control in obese mice and wireless modulation of social behaviours in multiple mice in the same physical space. Our study demonstrates the potential of cell-type-specific magnetogenetics as an effective and reliable research tool for life sciences, especially in wireless, long-term and freely behaving animals.