Facultative parasites can alternate between a free-living and a parasitic existence to complete their life cycle. Yet, it remains uncertain which lifestyle they prefer. The optimal foraging theory suggests that food preferences align with fitness benefits. To test this hypothesis, we investigated the facultative parasite nematode Rhabditis regina, assessing its host preference and the associated benefits. Two experiments were conducted using wild nematode populations collected from Phyllophaga polyphylla, their natural host. In the first experiment, we used a behavioral arena to assess host preference between the natural host and two experimental hosts: Spodoptera frugiperda which is an alternative host and dead Tenebrio molitor, which simulates a saprophytic environment. In the second experiment, we subjected wild nematodes to "experimental evolution" lasting 50 generations in S. frugiperda and 53 generations in T. molitor carcass. We then compared life history traits (the size, survival, number of larvae, and glycogen and triglycerides as energy reserves) of dauer larvae with those nematodes from P. polyphylla (control group). We found a significant preference for P. polyphylla, which correlated with higher values in the nematode’s life history traits. In contrast, the preference for S. frugiperda and the saprophytic environment was lower, resulting in less efficient life history traits. These findings align with the optimal foraging theory, as the nematode’s parasitic preferences are in line with maximizing fitness. This also indicates that R. regina exhibits specificity to P. polyphylla and is better adapted to a parasitic lifestyle than a free-living one, suggesting an evolutionary pathway towards parasitism.