Diabetic retinopathy is an important cause of blindness in adults, and is characterized by progressive loss of vascular cells and slow dissolution of inter-vascular junctions, which result in vascular leakage and retinal oedema. Later stages of the disease are characterized by inflammatory cell infiltration, tissue destruction and neovascularization. Here we identify soluble epoxide hydrolase (sEH) as a key enzyme that initiates pericyte loss and breakdown of endothelial barrier function by generating the diol 19,20-dihydroxydocosapentaenoic acid, derived from docosahexaenoic acid. The expression of sEH and the accumulation of 19,20-dihydroxydocosapentaenoic acid were increased in diabetic mouse retinas and in the retinas and vitreous humour of patients with diabetes. Mechanistically, the diol targeted the cell membrane to alter the localization of cholesterol-binding proteins, and prevented the association of presenilin 1 with N-cadherin and VE-cadherin, thereby compromising pericyte-endothelial cell interactions and inter-endothelial cell junctions. Treating diabetic mice with a specific sEH inhibitor prevented the pericyte loss and vascular permeability that are characteristic of non-proliferative diabetic retinopathy. Conversely, overexpression of sEH in the retinal Müller glial cells of non-diabetic mice resulted in similar vessel abnormalities to those seen in diabetic mice with retinopathy. Thus, increased expression of sEH is a key determinant in the pathogenesis of diabetic retinopathy, and inhibition of sEH can prevent progression of the disease.