The levitation and pinning force properties of nanocrystalline MgB2 superconductors prepared by a mechanical alloying technique with varying milling duration have been investigated. Levitation force measurements under zero-field-cooled regime were carried out at different temperatures (16, 25 and 30 K) as a function of the gap between bottom surface of the superconductor and the top surface of a cylindrical Nd-Fe-B permanent magnet whose diameter and height are 30 mm. An increase in the levitation force was observed due to the decrease in particle size caused by increasing the milling time. It was determined the levitation force of the sample milled for 72 h was higher than that milled for 24 h at the same measurement temperature. This is indicative of an enhancing flux pinning capability at the grain boundaries of the MgB2. Also, it was observed that the pinning properties of the superconductor shifted from surface pinning to normal point pinning above 8(max) when the milling time was increased from 24 to 72 h. (C) 2009 Elsevier B.V. All rights reserved.