The setting of the story is the Jews were under the impression the Messiah was going to come and deliver an internal and external peace. However, Jesus deemed it fit to let them know the contrary. Our world has an awful perception of peace. Jesus was coming to preach the word of God which would cause division amongst families. Isn't this what we see in many families now?
When I first studied this verse I was confused. Why would a man of peace use a sword on his people? Well, first the peace Jesus is talking about is transliterated as eiréné (i-ray'-nay), which means peace of mind, invocation of peace a common Jewish farewell, in the Hebraistic sense of the health (welfare) of an individual. This is not what Jesus is bringing. Jesus is bringing machaira (makh'-ahee-rah). Machaira in Greek means figuratively an instrument for exacting retribution. Jesus is bringing division. Why? Good question. Jesus wants to bring the word of God and reclaim what was God's in the beginning - a personal relationship with God's children. Jesus is separating the people of Christ from the men of the world, from their principles, practices, and any other relation of discord, and persecution arising from it. This is the only way to inherit the Kingdom of God.