To dehumanize someone is to make them either feel or appear somehow less than human. Laboring under terrible conditions can dehumanize workers, making them feel more like robots than people.
War can dehumanize people in a few different ways. Violent or seemingly endless fighting might dehumanize soldiers, causing them to stop feeling normal human emotions. War propaganda might dehumanize the enemy, making people more willing to fight against and kill them. At the heart of dehumanize is human, and its Latin root humanus, which means both "human" and "humane, kind, or civilized."