In the present study, the influence of four 1-alkyl-3-methylimidazolium bromine ionic liquids (ILs), CnMImBr (n=4, 8, 12, 16) on the sorption of acid dyes by nylon fibers was investigated. The quantity of dye sorption at pH 5 and pH 7 was found to be greatly dependent on the concentrations of ILs and the length of alkyl groups in ILs. The quantity of dyes adsorbed by nylon increased in the presence of C8MImBr at all the concentrations employed, and in the presence of C12MImBr and C16MImBr at appropriate concentrations. The mechanism of the increase in dye sorption in the presence of ILs at appropriate concentrations is due to the existence of the new positively charged dyeing sites in nylon induced by the sorption of ILs on nylon. The further increasing concentrations of C12MImBr and C16MImBr decreased the extent of dye sorption, which can be explained by the greatly reduced quantity of free dyes in solution induced by the interaction between anionic dyes and cationic ILs in solution as well as the increasing aggregation of the complex of dyes and ILs.