I don't remember the story well but I think at the beginning a Chinese ninja kills every member of a village and there was only small baby left in the village. After seeing the baby (wrapped in a basket on the lake shore, I think it was a girl) he chooses not to kill him and goes away from the city and raises the child in another city and works at his friend's laundry. But the people he was with come to kill the child, and he defends both the child and the city.
I think you are looking for The Warrior's Way (2010, written and directed by Sngmoo Lee).
After a lifetime of training in martial arts and swordsmanship, Yang (Jang Dong Gun) has eliminated all but one of his clan's enemies - an infant whose smile instantly melts his heart. Unwilling to kill her and unable to protect her from his own deadly tribe, Yang takes the baby girl and flees, planning to seek refuge with an old friend living in Lode, a frontier town in the American West.