Carotenoids are hydrophobic pigments produced exclusively by plants, fungi, and specific microbes. Microalgae are well suited for the production of valuable carotenoids due to their rapid growth, efficient isoprenoid production pathway, and ability to store these compounds within their cells. The possible markets for bio-products range from feed additives in aquaculture and agriculture to pharmaceutical uses. The production of carotenoids in microalgae is affected by several environmental conditions, which can be utilized to enhance productivity. The current study focused on optimizing the extraction parameters (time, temperature, and extraction number) to maximize the yield of carotenoids. Additionally, the impact of various nitrogen sources (ammonia, nitrate, nitrite, and urea) on the production of lutein and loroxanthin in Scenedesmus obliquus was examined. To isolate the carotenoids, 0.20 g of biomass was added to 0.20 g of CaCO3 and 10.0 mL of ethanol solution containing 0.01% (w/v) pyrogallol. Subsequently, the extraction was performed using an ultrasonic bath for a duration of 10 min at a temperature of 30 °C. This was followed by a four-hour saponification process using a 10% methanolic KOH solution. The concentration of lutein and loroxanthin was measured using HPLC–DAD at 446 nm, with a flow rate of 1.0 mL/min using a Waters YMC C30 Carotenoid column (4.6 × 250 mm, 5 μm). The confirmation of carotenoids after their isolation using preparative chromatography was achieved using liquid chromatography–tandem mass spectrometry (LC–MS/MS) with an atmospheric pressure chemical ionization (APCI) probe and UV–vis spectroscopy. In summary, S. obliquus shows significant promise for the large-scale extraction of lutein and loroxanthin. The findings of this study provide strong support for the application of this technology to other species.