In this paper, with the notion of independent identically distributed (IID) random variables under sub-linear expectations initiated by Peng, we investigate a law of the iterated logarithm for capacities. It turns out that our theorem is a natural extension of the Kolmogorov and the Hartman-Wintner laws of the iterated logarithm.