A man killed his wife and children with an axe during a family dispute and was arrested at the scene.