The invention discloses a vortex optical fiber formed by fiber cores on basis of linear refractive index distribution and a preparation method thereof. The vortex optical fiber is formed by fiber cores in linear refractive index distribution in a hot melting and twisting mode, and the refractive indexes of the fiber cores of the optical fiber are in linear distribution in the transverse direction and are in helical curve distribution in the longitudinal direction. Because of refractive index distribution, conduction optical waves can form radial phase differences, optical waves transmitted in the optical fiber can obtain orbital angular momentum, meanwhile vortex transmission is formed on light intensity and phase positions, and a vortex-like optical transmission mode is formed. The whole optical fiber has the advantages of being tiny in structure, flexible in operation, stable in system, high in antijamming capability and the like, and can be used for light beam generation, particle control, sensing application and other aspects.