Low vitamin D level in HIV-positive persons has been associated with disease progression. We compared the levels of serum 25-hydroxyvitamin D (25(OH)D) in HIV-positive and HIV-negative persons, and investigated the role of nutritional supplementation and antiretroviral treatment (ART) on serum 25(OH)D levels. A randomised nutritional supplementation trial was conducted at Jimma University Specialized Hospital, Ethiopia. The trial compared 200 g/d of lipid-based nutrient supplement (LNS) with no supplementation during the first 3 months of ART. The supplement provided twice the recommended daily allowance of vitamin D (10 μg/200 g). The level of serum 25(OH)D before nutritional intervention and ART initiation was compared with serum 25(OH)D of HIV-negative individuals. A total of 348 HIV-positive and 100 HIV-negative persons were recruited. The median baseline serum 25(OH)D level was higher in HIV-positive than in HIV-negative persons (42·5 v. 35·3 nmol/l, P<0·001). In all, 282 HIV-positive persons with BMI>17 kg/m2 were randomised to either LNS supplementation (n 189) or no supplementation (n 93) during the first 3 months of ART. The supplemented group had a 4·1 (95 % CI 1·7, 6·4) nmol/l increase in serum 25(OH)D, whereas the non-supplemented group had a 10·8 (95 % CI 7·8, 13·9) nmol/l decrease in serum 25(OH)D level after 3 months of ART. Nutritional supplementation that contained vitamin D prevented a reduction in serum 25(OH)D levels in HIV-positive persons initiating ART. Vitamin D replenishment may be needed to prevent reduction in serum 25(OH)D levels during ART.