Lasmiditan (LAS) was formulated as a nanoemulsion based in situ gel (NEIG)with the aim of improving its oral bioavailability via application intranasally. The solubility of LAS in oils, emulsifiers, and co-emulsifiers was determined to identify nanoemulsion (NE)components. Phase diagrams were constructed to identify the area of nanoemulsification. LAS NE was formulated using the spontaneous nanoemulsification method. Four NEs (F19, F24, F31, and F34) containing 7-15 % oleic acid (OA) as an oily phase, 40-55% labrasol (LR), and transcutol (TC) as emulsifier mixture at (1:1), (2:1), (3:1), and (1:2) ratio with 30-53 % (w/w) aqueous phase, having suitable optical transparency of 95–98%, globule size of 104-140 nm and polydispersity of 0.253–0.382 were selected for ex vivo permeation study. F31 with the highest flux value (2.32 ± 0.01 mg/cm2.min) relative to the other NEs. It achieves an enhancement ratio of 3.3 as compared to LAS aqueous suspension (8% LAS) also it achieves a significantly higher value of permeability coefficient. F31 was selected for the incorporation of different percentages of pH-sensitive in situ gelling polymer (Carbopol 934) to prepare NEIGs 4,5 and 6. The gel strength, pH, gelation time, and viscosity were predicted for the prepared NEIGs. In vitro release and ex vivo, nasal permeation were determined for NEIG5, which exerts comparable release and permeation values as F31 with more residence time in order to overcome the normal nasal physiological clearance.