Drug repurposing is a promising approach to identify new pharmacological indications for drugs that have already been established. However, there is still a limitation in the availability of a high-throughput in vivo preclinical system that is suitable for screening and investigating new pharmacological indications. The aim of this study was to introduce the application of Drosophila larvae as an in vivo platform to screen drug candidates with anti-aging and immunomodulatory activities. To determine whether Drosophila larvae can be utilized for assessing anti-aging and immunomodulatory activities, phenotypical and molecular assays were conducted using wildtype and mutant lines of Drosophila. The utilization of mutant lines (PGRP-LBΔ and Psh[1];;ModSP[KO]) mimics the autoinflammatory and immunodeficient conditions in humans, thereby enabling a thorough investigation of the effects of various compounds. The phenotypical assay was carried out using survival and locomotor observation in Drosophila larvae and adult flies. Meanwhile, the molecular assay was conducted using the RT-qPCR method. In vivo survival analysis revealed that caffeine was relatively safe for Drosophila larvae and exhibited the ability to extend Drosophila lifespan compared to the untreated controls, suggesting its anti-aging properties. Further analysis using the RT-qPCR method demonstrated that caffeine treatment induced transcriptional changes in the Drosophila larvae, particularly in the downstream of NF-κB and JAK-STAT pathways, two distinct immune-related pathways homologue to humans. In addition, caffeine enhanced the survival of Drosophila autoinflammatory model, further implying its immunosuppressive activity. Nevertheless, this compound had minimal to no effect on the survival of Staphylococcus aureus-infected wildtype and immunodeficient Drosophila, refuting its antibacterial and immunostimulant activities. Overall, our results suggest that the anti-aging and immunosuppressive activities of caffeine observed in Drosophila larvae align with those reported in mammalian model systems, emphasizing the suitability of Drosophila larvae as a model organism in drug repurposing endeavors, particularly for the screening of newly discovered chemical entities to assess their immunomodulatory activities before proceedings to investigations in mammalian animal models.