The structural stabilities and electronic properties of four kinds of ZnO nanowires (NWs) are investigated by using first-principles approaches. It shows that the stability of ZnO NWs increases as the size increases. The band gaps of ZnO NWs become larger than that of the corresponding bulk wurtzite ZnO due to quantum size effect, and decrease as the size increases.