First-principles density functional calculations were performed to investigate mechanical properties of ZnO nanowires and the size effects. Structural optimizations were performed first, and a series of strains were applied to the nanowires in the axial direction. The ground state energies were calculated and the elastic moduli of ZnO nanowires were obtained from the energy versus strain curves. It is found that the elastic moduli of the ZnO nanowires with three different diameters (1.2, 1.5 and 1.8nm) are 136.3, 138.7 and 138.0 GPa, respectively, and that of bulk ZnO along  direction is 140.1 GPa. The elastic modulus of ZnO nanowire is slightly lower than that of the bulk and it decreases as the diameter decreases. Comparisons to experimental results and theoretical predications are made.