if he felt insecure, his performance might not be good enough. If you could work with him to accomplish something and to secure his position, he might treat you differently.
I would try to show my strong intention to work this out with him. Show him what you can do to help.
Fighting with boss is always a bad idea unless you can transfer or get another position somewhere.
JMHO.