I solves this, but with other code because this dont work. But, why this code dont work? i think the problem is that entrada.next().getValue(); and entrada2.next().getValue(); in the first time compare the same key. public static void removeFirstNameDuplicates(Map<String, String> map) { ArrayList<String> removes = new ArrayList<String>(10); Iterator <HashMap.Entry<String,String>> entrada = map.entrySet().iterator(); Iterator <HashMap.Entry<String,String>> entrada2 = map.entrySet().iterator(); while(entrada.hasNext()) { String b = entrada.next().getValue(); while(entrada2.hasNext()){ String c = entrada2.next().getValue(); System.out.println("c" + "" + c ); if(b.equals(c)){ removes.add(b); } } } System.out.println(removes); for(String s : removes){ removeItemFromMapByValue(map, s); }