At first glance The Misfit's motivation for killing the family seems to be solely that the grandmother identified him. When she does he says, "Yes'm... but it would have been better for all of you, lady, if you hadn't of reckernized me." However it seems likely that he would have killed them regardless; he lives by a violent moral code, "the only pleasure is meanness." This code explains not only his killing the family, but his criminal acts in general- he takes pleasure in killing.
In contrast to the grandmother, The Misfit's moral code is well examined and, at least until the end of the story, unwavering. The grandmother's moral code is based on social standing. She repeatedly calls The Misfit a good man, despite his actions, based only on his breeding and desire to put on a proper shirt in front of ladies. She tells him to pray to Jesus but, even as her family is murdered, she never does so. As The Misfit and the grandmother discuss Christian theology, he is confident in the assessment that gave rise to his own moral code, while the grandmother recants a major part of her faith, stating "Maybe He didn't raise the dead."
In spite of his confidence in his moral code prior to the killings, his conversation with the grandmother seems to have an impact. While he previously stated, "the only pleasure is meanness," after shooting the grandmother he says, "It's no real pleasure in life," implying he no longer takes pleasure in killing.