Fractal scaling governs the complex behavior of various animal species and, in humans, can be altered by neurodegenerative diseases and aging1. However, the mechanism underlying fractal scaling remains unknown. Here, we videorecorded C. elegans that had been cultured in a microfluidic device for 3 days and analyzed temporal patterns of C. elegans actions by fractal analyses. The residence-time distribution of C. elegans shared a common feature with those of human and mice2–4. Specifically, the residence-time power-law distribution of the active state changed to an exponential-like decline at a longer time scale, whereas this change did not occur in the inactive state. The exponential-like decline disappeared in starved C. elegans but was restored by culturing animals with glucose. The exponential-like decline similarly disappeared in insulin-signaling daf-2 and daf-16 mutants. Therefore, we conclude that insulin signaling regulates fractal scaling of C. elegans behavior. Our findings indicate that neurosensory modulation of C. elegans behavior by insulin signaling is achieved by regulation of fractal scaling. In humans, diabetes mellitus is associated with depression, bipolar disorder, and anxiety disorder5, which affect daily behavioral activities. We hypothesize that comorbid behavioral defects in patients with diabetes may be attributed to altered fractal scaling of human behavior.