The research study aimed to maximize the important medical role of star anise extract (SAE) through its loading on a widely available natural polymer (chitosan, Cs). Thus, SAE loaded chitosan nanoparticles (CsNPs) was prepared. The finding illustrated the formation of spherical particles of SAE loaded CsNPs as proved by transmission electron microscope (TEM). In addition, the average particle size of CsNPs and SAE loaded CsNPs are 131.8 ± 24.63 and 318.5 ± 73.94 nm, respectively. Scanning electron microscope (SEM) showed the presence of many spherical particles deposited on the surface of CsNPs owing to the deposition of SAE on the surface and encapsulated into pores of CsNPs. It also showed the presence of elements such as sodium, potassium, copper, magnesium, zinc, calcium, and iron, as well as the elements that accompanied with CsNPs: carbon, oxygen, nitrogen, and phosphorus. The extract was rich in bioactive components, such as anethole, shikimic acid, and different flavonoids, contributing to its medicinal qualities. The bioactive molecules in SAE were assessed by chromatographic analysis. Using the agar well diffusion test, the antibacterial qualities of CsNPs and SAE loaded CsNPs were evaluated against pathogenic bacteria linked to lung illnesses. The most significant inhibition zones showed that the SAE loaded CsNPs had the most antibacterial activity. The anticancer activity using MTT assay was used in the biological assessments to determine the cytotoxicity against the NCl-H460 lung cancer cell line. The results showed that CsNPs loaded with SAE considerably decreased cell viability in a dose-dependent manner, with the most significant anticancer impact by SAE loaded CsNPs. Furthermore, in vivo tests on lung cancer therapy revealed that when compared to other treatment groups, the SAE loaded CsNPs group showed the greatest reduction in tumor biomarkers and inflammation, as seen by decreased levels of Plasma malondialdehyde (MDA), tumor protein 53 (p53), Tumor necrosis factor-alpha (TNF- alpha), and fibronectin. Results concluded that these thorough characterizations, biological assessments, and antibacterial tests have confirmed the effective integration of SAE into CsNPs. Further, SAE loaded CsNPs could be a suitable option for various biomedical applications in tackling lung cancer and the inactivation of bacterial infection.