Both are correct. He is going to visit underlines the person's intention. He and him in the same sentence may cause confusion as to who is going to visit whom .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.