The effect of surface functionalization on the electronic properties of InAs nanowires is investigated by the first-principle calculations. Several surface adsorption species (H, F, Cl, Br, and I) with different coverages are considered. It is found that the electronic structures of InAs nanowires are sensitive to the coverage and adsorption sites of the passivating atoms. The band-gap magnitude of InAs nanowires depends on the suppression of surface states as determined by the charge-compensation ability of passivating atoms to surface atoms. For the halogen passivation, the weak charge-compensation ability induces the band-gap reduction when compared to the hydrogen passivation. The results provide us a feasible way to engineer the bandgap of nanowires by the modification of surface species.