Vitamin D deficiency and endothelial dysfunction are non-traditional risk factors for cardiovascular events in chronic kidney disease. Previous studies in chronic kidney disease have failed to demonstrate a beneficial effect of vitamin D on arterial stiffness, left ventricular mass and inflammation but none have assessed the effect of vitamin D on microcirculatory endothelial function. We conducted a randomised controlled trial of 38 patients with non diabetic chronic kidney disease stage 3-4 and concomitant vitamin D deficiency (<16 ng/dl) who received oral ergocalciferol (50,000 IU weekly for one month followed by 50,000 IU monthly) or placebo over 6 months. The primary outcome was change in microcirculatory function measured by laser Doppler flowmetry after iontophoresis of acetylcholine. Secondary endpoints were tissue advanced glycation end products, sublingual functional capillary density and flow index as well as macrovascular parameters. Parallel in vitro experiments were conducted to determine the effect of ergocalciferol on cultured human endothelial cells. Twenty patients received ergocalciferol and 18 patients received placebo. After 6 months, there was a significant improvement in the ergocalciferol group in both endothelium dependent microcirculatory vasodilatation after iontophoresis of acetylcholine (p = 0.03) and a reduction in tissue advanced glycation end products (p = 0.03). There were no changes in sublingual microcirculatory parameters. Pulse pressure (p = 0.01) but not aortic pulse wave velocity was reduced. There were no significant changes in bone mineral parameters, blood pressure or left ventricular mass index suggesting that ergocalciferol improved endothelial function independently of these parameters. In parallel experiments, expression of endothelial nitric oxide synthase and activity were increased in human endothelial cells in a dose dependent manner. Ergocalciferol improved microcirculatory endothelial function in patients with chronic kidney disease and concomitant vitamin D deficiency. This process may be mediated through enhanced expression and activity of endothelial nitric oxide synthase. Clinical trials.gov NCT00882401.