More than 120 million mice and rats are used yearly for scientific purposes. While tracking their motion behaviors has been an essential issue for the past decade, present techniques, such as video‐tracking and IMU‐tracking have considerable problems, including requiring a complex setup or relatively large IMU modules that cause stress to the animals. Here, we introduce a wireless IoT motion sensor (i.e., weighing only 2 g) that can be attached and carried by mice to collect motion data continuously for several days. We also introduce a combined segmentation method and an imbalanced learning process that are critical for enabling the recognition of common but random mouse behaviors (i.e., resting, walking, rearing, digging, eating, grooming, drinking water, and scratching) in cages with a macro‐recall of 94.55%. An interactive preprint version of the article can be found at: https://doi.org/10.22541/au.166005321.10787501/v1.