The energy spectra of carriers confined to a cylindrical semiconductor quantum wire in an inhomogeneous magnetic field (which is B = 0, r < r(0) and B = 0 elsewhere) are studied, by taking into account the real band structure of InSb-type semiconductors, narrow energy gap and strong spin orbit interaction. It is found that the eigenenergy spectra for the magnetic quantum wire critically depend on the number of missing flux quantas. As the magnetic field increases it is found that the deviation of energies from the Landau levels become significant, which leads to the magnetic edge states near the boundary of the wire. The magnetic field and the radius dependence of the edge g-factor are also studied. (c) 2006 Elsevier B.V. All rights reserved.