Microemulsion (ME) and poloxamer microemulsion-based gel (PMBG) were developed and optimized to enhance transport of diclofenac epolamine (DE) into the skin forming in-skin drug depot for sustained transdermal delivery of drug. D-optimal mixture experimental design was applied to optimize ME that contains maximum amount of oil, minimum globule size and optimum drug solubility. Three formulation variables; the oil phase X1 (Capryol(®)), Smix X2 (a mixture of Labrasol(®)/Transcutol(®), 1:2 w/w) and water X3 were included in the design. The systems were assessed for drug solubility, globule size and light absorbance. Following optimization, the values of formulation components (X1, X2, and X3) were 30%, 50% and 20%, respectively. The optimized ME and PMBG were assessed for pH, drug content, skin irritation, stability studies and ex vivo transport in rat skin. Contrary to PMBG and Flector(®) gel, the optimized ME showed the highest cumulative amount of DE permeated after 8h and the in vivo anti-inflammatory efficacy in rat paw edema was sustained to 12h after removal of ME applied to the skin confirming the formation of in-skin drug depot. Our results proposed that topical ME formulation, containing higher fraction of oil solubilized drug, could be promising for sustained transdermal delivery of drug.