Using first-principles calculations, we investigate the structural stability and electronic properties of InSb nanowires (NWs). The results show that, in contrast to the bulk InSb phase, wurtzite (WZ) NWs are more stable than zinc-blende (ZB) NWs when the NW diameter is smaller than 10 nm. Nonpassivated ZB and WZ NWs are found to be metallic and semiconducting, respectively. After passivation, both ZB and WZ NWs exhibit direct-gap semiconductor character, and the band gap magnitude of the NWs strongly depends on the suppression of surface states by the charge-compensation ability of foreign atoms to surface atoms. Moreover, the carrier mobility of the NW can be strengthened by halogen passivation.