This study aimed to evaluate the effect of two protein sources (black soldier fly [Hermetia illucens] meal [BSFM] vs. fish meal [FM]) on intake target “diet preference” in juvenile Nile tilapia (Oreochromis niloticus) by a self‐feeding method (trial 1). Growth, body composition, blood parameters, and immunity genes expression were also evaluated to be correlated with behavioral data (trial 2). Four experimental diets were prepared containing 0%, 33%, 66%, and 100% BSFM as a substitute for FM protein, which were considered treatments T0 (control), T33, T66, and T100, respectively. In trial 1 (32 days), 60 juveniles (77.97 ± 8.5 g, standard error of the mean [SEM]) were randomly distributed in 60 aquariums (40 L). Fish were challenged to select among A, T0 vs. T33; B, T0 vs. T66; C, T0 vs. T100; D, T33 vs. T66; E, T33 vs. T100; and F, T66 vs. T100 using two floating food halls per aquarium to provide different diets. In trial 2, 240 juveniles (2.80 ± 0.25 g) were distributed in 16 tanks (40 L). The experimental design was completely randomized with four treatments (T0, T33, T66, and T100) and four replies. Fish were fed (5% body weight [BW]) experimental diets for 2 months. For the trial 1 results, no difference was observed in A, T0 vs. T33 (p > 0.05). Fish were allowed to select conditions B, C, D, E, and F and preferred the diets containing no or low BSFM content: B = T0, C = T0, D = T33, E = T33, and F = T66 (p < 0.05). In trial 2, final weight and daily weight gain had lower values when animals were fed 100% FM replacement with BSFM (p < 0.05). The fish fed T0 showed lower viscerosomatic indices (p < 0.05). Moisture and total protein were higher in the fish fed T0, but protein content did not differ from T33 (p > 0.05). Ethereal extract increased with rising BSFM (p < 0.05). There were no significant differences in glucose, creatinine, total protein, high‐density lipoprotein (HDL), low‐density lipoprotein (LDL), aspartate transaminase (AST), and alanine transaminase (ALT) (p > 0.05). Total cholesterol, triglycerides, and albumin lowered in fish when increase dietary BSFM (p < 0.05). gpx, il-8, il-10, tnf-α, sod, cat, tlr-1, myd, and nf-κb did not differ among treatments (p > 0.05). However, il‐1β expression increased in T0 and T100 (p < 0.05). Diets with up to 66% BSFM did not affect performance of juvenile tilapia. However, fish showed a preference for diet containing 33% BSFM.