Changing the order of the words often changes the meaning or nuance.
"I don't think he likes it" is the normal formulation. It focuses on the thoughts and opinions of the speaker. Its purpose is to make a commentary.
"I think he doesn't like it" can be used as a way of contradicting expectations, e.g.
"Don't poke the cat with that stick."
"We're just playing."
"Well, I think he doesn't like it."
This focuses on and directs the attention towards the feelings of the cat -- its purpose is to change someone else's perceptions.
Note that the basic meaning here is, "He doesn't like it. " The addition of "I think" does not indicate doubt on the part of the speaker. It is used to make the statement seem less harsh.
Yes, it is grammatically correct to say a sentence like "I think he doesn't like it". Just be aware that such a rephrasing usually changes the meaning or requires a particular context.