The electronic structure and optical properties of Zn1-x BexO alloys were studied using first principle calculation based on density functional theory (DTF). The results indicate that the band gap of Zn1-x BexO alloys increases as Be composition increases. The major reason is that the valence band maximum (VBM) of O2p has no obvious shift while the conduction band minimum (CBM) of Zn4s shifts to higher energy as x composition increases. Calculated results of the imaginary part of the dielectric function reveal that the peak heights at 2.0 and 6.76eV decrease as x composition increases, which is attributed to the decrease of the Zn3d states after Be substitutes for Zn. Due to the increasing transition probability from VBM of O2p to CBM of Be2s in wurtzite structure BeO,the peak height at 9.9eV is enhanced and its position shifts toward higher energy.