The aim of this study was to evaluate the effects of agro-industrial byproduct-based diets on the productive parameters, digestibility, insect composition, and gut microbiota of mealworm (Tenebrio molitor) larvae. Three formulations corresponding to three different levels of starch and protein were tested: one formulation based on bread remains and brewer’s yeast, representing a diet of high starch (61.1%) and low crude protein (18.5%) (HS-LP); and two formulations in which an additional four byproducts (courgette (Cucurbita pepo) remains, tigernut (Cyperus scelentus) pulp, brewer’s spent grains, and rice straw) were incorporated in different proportions, consistent with a diet of both moderate starch (29.8%) and crude protein (21.0%) (MS-MP); and another corresponding to a diet of low starch (20.0%) and high crude protein (26.3%) (LS-HP). A total of 1920 young larvae (average weight = 0.65 mg per larva) were used in this study. The larvae were randomly distributed into 16 replicates per treatment (boxes of 22.5 cm × 14.0 cm × 4.75 cm). Ten replicates for the growth performance–digestibility trial and six replicates for the complementary trial to determine uric acid levels in the frass were assigned per treatment. For growth performance, the diets were administered ad libitum during the experiment. The average number of days for the larvae to start pupating was lower in those reared on the HS-LP and LS-HP diets (88.90 and 91.00 days, respectively) than those on the MS-MP diet (120.09 days) (p < 0.001). The final individual weight was higher (p < 0.001) in larvae of the LS-HP group (168.69 mg) compared to those of the other groups (100.29 and 112.99 mg for HS-LP and MS-MP, respectively). However, the feed conversion ratio was better (p < 0.001) in the HS-LP group with the lowest value (1.39 g/g), with dry matter digestibility being the highest for the same diet (70.38%) (p < 0.001). Mealworms reared on LS-HP and MS-MP diets had a higher crude protein content than those reared on the HS-LP diet (p = 0.039). The most abundant phyla in the gut microbiota of larvae were Tenericutes, Proteobacteria, and Firmicutes, with their abundance depending on the rearing substrate. The representation of Tenericutes phylum was higher (p < 0.05) in the mealworms reared on MS-MP and HS-LP diets, whereas Proteobacteria and Cyanobacteria were higher in abundance (p < 0.001) in the insects reared on LS-HP. In conclusion, the larval growth, digestibility, insect composition, and gut microbiota of Tenebrio molitor were found to depend on the composition of the administered diet, and the results suggest great potential for the use of agro-industrial byproducts in their rearing and production.