The problem of imbalanced data is an important research for data mining and sampling is an effective method. According to the disadvantage of the sampling, limitations, a novel mixed sampling algorithm for imbalanced data based on neighborhood density is developed. Combined with neighborhood Three-Way Decision model, computed the neighborhood density and decision function, the data is divided into different areas. For the area which has the high density of majority class data, use under-sampling to deal with it; for the area which has a balance between majority data and minority data, use SMOTE to deal with it; for the area which has the high density of minority data, use over-sampling to deal with it. Tested in the standard UCI data sets, the proposed algorithm is mostly better than others in paper and has a better result than others in classification.